You can subscribe to this list here.
2006 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(4) |
Nov
(39) |
Dec
(10) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2007 |
Jan
(19) |
Feb
(150) |
Mar
(10) |
Apr
|
May
(8) |
Jun
(11) |
Jul
(27) |
Aug
(52) |
Sep
(35) |
Oct
(30) |
Nov
(18) |
Dec
(4) |
2008 |
Jan
(76) |
Feb
(121) |
Mar
(39) |
Apr
(55) |
May
(18) |
Jun
(49) |
Jul
(32) |
Aug
(4) |
Sep
(10) |
Oct
|
Nov
(3) |
Dec
(33) |
2009 |
Jan
(19) |
Feb
(87) |
Mar
(69) |
Apr
(38) |
May
(47) |
Jun
(20) |
Jul
(5) |
Aug
(76) |
Sep
(145) |
Oct
(34) |
Nov
(8) |
Dec
(68) |
2010 |
Jan
(150) |
Feb
(379) |
Mar
(191) |
Apr
(100) |
May
(525) |
Jun
(269) |
Jul
(127) |
Aug
(190) |
Sep
(190) |
Oct
(29) |
Nov
(147) |
Dec
(83) |
2011 |
Jan
(188) |
Feb
(81) |
Mar
(43) |
Apr
(97) |
May
(63) |
Jun
(129) |
Jul
(17) |
Aug
(124) |
Sep
(6) |
Oct
(20) |
Nov
(67) |
Dec
(23) |
2012 |
Jan
(6) |
Feb
(14) |
Mar
(181) |
Apr
(64) |
May
(102) |
Jun
(47) |
Jul
(26) |
Aug
(3) |
Sep
(1) |
Oct
(14) |
Nov
(13) |
Dec
(23) |
2013 |
Jan
(4) |
Feb
(14) |
Mar
(18) |
Apr
(14) |
May
(27) |
Jun
(27) |
Jul
(5) |
Aug
(2) |
Sep
(74) |
Oct
(79) |
Nov
(21) |
Dec
(97) |
2014 |
Jan
(6) |
Feb
(3) |
Mar
(8) |
Apr
|
May
(5) |
Jun
|
Jul
(9) |
Aug
(6) |
Sep
(3) |
Oct
(10) |
Nov
(6) |
Dec
|
2015 |
Jan
|
Feb
|
Mar
(1) |
Apr
(25) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
(5) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <hu...@op...> - 2010-11-05 14:06:32
|
See <https://hudson.openmindonline.it/job/openutils-testing-junit/29/> |
From: <hu...@op...> - 2010-10-28 08:55:40
|
See <https://hudson.openmindonline.it/job/openutils-elfunctions/net.sourceforge.openutils$openutils-elfunctions/29/changes> |
From: <hu...@op...> - 2010-10-28 08:55:40
|
See <https://hudson.openmindonline.it/job/openutils-elfunctions/29/changes> |
From: <mmu...@us...> - 2010-10-28 07:59:45
|
Revision: 3125 http://openutils.svn.sourceforge.net/openutils/?rev=3125&view=rev Author: mmunaretto Date: 2010-10-28 07:59:38 +0000 (Thu, 28 Oct 2010) Log Message: ----------- added license to test class Modified Paths: -------------- trunk/openutils-elfunctions/src/test/java/net/sourceforge/openutils/elfunctions/ElStringUtilsTest.java Modified: trunk/openutils-elfunctions/src/test/java/net/sourceforge/openutils/elfunctions/ElStringUtilsTest.java =================================================================== --- trunk/openutils-elfunctions/src/test/java/net/sourceforge/openutils/elfunctions/ElStringUtilsTest.java 2010-10-27 16:36:52 UTC (rev 3124) +++ trunk/openutils-elfunctions/src/test/java/net/sourceforge/openutils/elfunctions/ElStringUtilsTest.java 2010-10-28 07:59:38 UTC (rev 3125) @@ -1,3 +1,21 @@ +/** + * + * openutils-elfunctions (http://www.openmindlab.com/lab/products/elfunctions.html) + * Copyright(C) 2008-2010, Openmind S.r.l. http://www.openmindonline.it + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package net.sourceforge.openutils.elfunctions; import org.testng.Assert; @@ -4,6 +22,10 @@ import org.testng.annotations.Test; +/** + * @author mmunaretto + * @version $Id: ElStringUtilsTest.java 2122 2010-03-09 20:02:04Z mmunaretto $ + */ public class ElStringUtilsTest { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hu...@op...> - 2010-10-27 16:55:46
|
See <https://hudson.openmindonline.it/job/openutils-elfunctions/net.sourceforge.openutils$openutils-elfunctions/28/changes> Changes: [mmunaretto] added simple hyphenation function ------------------------------------------ <===[HUDSON REMOTING CAPACITY]===> channel started Executing Maven: -B -f <https://hudson.openmindonline.it/job/openutils-elfunctions/net.sourceforge.openutils$openutils-elfunctions/ws/pom.xml> clean install [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Building openutils-elfunctions [INFO] task-segment: [clean, install] [INFO] ------------------------------------------------------------------------ [INFO] [clean:clean {execution: default-clean}] [INFO] Deleting directory <https://hudson.openmindonline.it/job/openutils-elfunctions/net.sourceforge.openutils$openutils-elfunctions/ws/target> [INFO] [resources:resources {execution: default-resources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 3 resources [INFO] [compiler:compile {execution: default-compile}] [INFO] Compiling 3 source files to <https://hudson.openmindonline.it/job/openutils-elfunctions/net.sourceforge.openutils$openutils-elfunctions/ws/target/classes> [INFO] [resources:testResources {execution: default-testResources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 69 resources [INFO] [compiler:testCompile {execution: default-testCompile}] [INFO] Compiling 3 source files to <https://hudson.openmindonline.it/job/openutils-elfunctions/net.sourceforge.openutils$openutils-elfunctions/ws/target/test-classes> [INFO] [surefire:test {execution: default-test}] [INFO] Surefire report directory: <https://hudson.openmindonline.it/job/openutils-elfunctions/net.sourceforge.openutils$openutils-elfunctions/ws/target/surefire-reports> ------------------------------------------------------- T E S T S ------------------------------------------------------- Running TestSuite Tests run: 39, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 7.217 sec <<< FAILURE! Results : Failed tests: formatDate(net.sourceforge.openutils.elfunctions.JspTest) Tests run: 39, Failures: 1, Errors: 0, Skipped: 0 [ERROR] There are test failures. Please refer to <https://hudson.openmindonline.it/job/openutils-elfunctions/net.sourceforge.openutils$openutils-elfunctions/ws/target/surefire-reports> for the individual test results. [HUDSON] Recording test results [INFO] [jar:jar {execution: default-jar}] [INFO] Building jar: <https://hudson.openmindonline.it/job/openutils-elfunctions/net.sourceforge.openutils$openutils-elfunctions/ws/target/openutils-elfunctions-1.1.2-SNAPSHOT.jar> [INFO] Preparing source:jar [WARNING] Removing: jar from forked lifecycle, to prevent recursive invocation. [INFO] No goals needed for project - skipping [INFO] [source:jar {execution: attach-sources}] [INFO] Building jar: <https://hudson.openmindonline.it/job/openutils-elfunctions/net.sourceforge.openutils$openutils-elfunctions/ws/target/openutils-elfunctions-1.1.2-SNAPSHOT-sources.jar> [INFO] [assembly:single {execution: bundle}] [INFO] Reading assembly descriptor: <https://hudson.openmindonline.it/job/openutils-elfunctions/net.sourceforge.openutils$openutils-elfunctions/ws/src/main/assembly/assembly-bundle.xml> [INFO] Building zip: <https://hudson.openmindonline.it/job/openutils-elfunctions/net.sourceforge.openutils$openutils-elfunctions/ws/target/openutils-elfunctions-1.1.2-SNAPSHOT-bundle.zip> [INFO] [license:check {execution: default}] [INFO] Checking licenses... [INFO] Missing header in: <https://hudson.openmindonline.it/job/openutils-elfunctions/net.sourceforge.openutils$openutils-elfunctions/ws/src/test/java/net/sourceforge/openutils/elfunctions/ElStringUtilsTest.java> [HUDSON] Archiving <https://hudson.openmindonline.it/job/openutils-elfunctions/net.sourceforge.openutils$openutils-elfunctions/ws/pom.xml> to /data/hudson-data/jobs/openutils-elfunctions/modules/net.sourceforge.openutils$openutils-elfunctions/builds/2010-10-27_18-44-13/archive/net.sourceforge.openutils/openutils-elfunctions/1.1.2-SNAPSHOT/pom.xml [HUDSON] Archiving <https://hudson.openmindonline.it/job/openutils-elfunctions/net.sourceforge.openutils$openutils-elfunctions/ws/target/openutils-elfunctions-1.1.2-SNAPSHOT.jar> to /data/hudson-data/jobs/openutils-elfunctions/modules/net.sourceforge.openutils$openutils-elfunctions/builds/2010-10-27_18-44-13/archive/net.sourceforge.openutils/openutils-elfunctions/1.1.2-SNAPSHOT/openutils-elfunctions-1.1.2-SNAPSHOT.jar [HUDSON] Archiving <https://hudson.openmindonline.it/job/openutils-elfunctions/net.sourceforge.openutils$openutils-elfunctions/ws/target/openutils-elfunctions-1.1.2-SNAPSHOT-sources.jar> to /data/hudson-data/jobs/openutils-elfunctions/modules/net.sourceforge.openutils$openutils-elfunctions/builds/2010-10-27_18-44-13/archive/net.sourceforge.openutils/openutils-elfunctions/1.1.2-SNAPSHOT/openutils-elfunctions-1.1.2-SNAPSHOT-sources.jar [HUDSON] Archiving <https://hudson.openmindonline.it/job/openutils-elfunctions/net.sourceforge.openutils$openutils-elfunctions/ws/target/openutils-elfunctions-1.1.2-SNAPSHOT-bundle.zip> to /data/hudson-data/jobs/openutils-elfunctions/modules/net.sourceforge.openutils$openutils-elfunctions/builds/2010-10-27_18-44-13/archive/net.sourceforge.openutils/openutils-elfunctions/1.1.2-SNAPSHOT/openutils-elfunctions-1.1.2-SNAPSHOT-bundle.zip [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Some files do not have the expected license header [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 31 seconds [INFO] Finished at: Wed Oct 27 18:44:48 CEST 2010 [INFO] Final Memory: 41M/262M [INFO] ------------------------------------------------------------------------ |
From: <hu...@op...> - 2010-10-27 16:55:43
|
See <https://hudson.openmindonline.it/job/openutils-elfunctions/28/changes> Changes: [mmunaretto] added simple hyphenation function ------------------------------------------ Started by an SCM change Updating https://openutils.svn.sourceforge.net/svnroot/openutils/trunk/openutils-elfunctions A src/test/java/net/sourceforge/openutils/elfunctions/ElStringUtilsTest.java U src/main/java/net/sourceforge/openutils/elfunctions/ElStringUtils.java U src/main/resources/META-INF/stringutils.tld At revision 3124 Parsing POMs [openutils-elfunctions] $ /usr/local/jdk1.6.0_20/bin/java -cp /data/hudson-data/plugins/maven-plugin/WEB-INF/lib/maven-agent-1.354.jar:/usr/local/maven/boot/classworlds-1.1.jar hudson.maven.agent.Main /usr/local/maven /data/webapps/hudson/WEB-INF/lib/remoting-1.354.jar /data/hudson-data/plugins/maven-plugin/WEB-INF/lib/maven-interceptor-1.354.jar 39704 /data/hudson-data/plugins/maven-plugin/WEB-INF/lib/maven2.1-interceptor-1.2.jar <===[HUDSON REMOTING CAPACITY]===> channel started Executing Maven: -B -f <https://hudson.openmindonline.it/job/openutils-elfunctions/ws/openutils-elfunctions/pom.xml> clean install [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Building openutils-elfunctions [INFO] task-segment: [clean, install] [INFO] ------------------------------------------------------------------------ [INFO] [clean:clean {execution: default-clean}] [INFO] Deleting directory <https://hudson.openmindonline.it/job/openutils-elfunctions/ws/openutils-elfunctions/target> [INFO] [resources:resources {execution: default-resources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 3 resources [INFO] [compiler:compile {execution: default-compile}] [INFO] Compiling 3 source files to <https://hudson.openmindonline.it/job/openutils-elfunctions/ws/openutils-elfunctions/target/classes> [INFO] [resources:testResources {execution: default-testResources}] [INFO] Using 'UTF-8' encoding to copy filtered resources. [INFO] Copying 69 resources [INFO] [compiler:testCompile {execution: default-testCompile}] [INFO] Compiling 3 source files to <https://hudson.openmindonline.it/job/openutils-elfunctions/ws/openutils-elfunctions/target/test-classes> [INFO] [surefire:test {execution: default-test}] [INFO] Surefire report directory: <https://hudson.openmindonline.it/job/openutils-elfunctions/ws/openutils-elfunctions/target/surefire-reports> ------------------------------------------------------- T E S T S ------------------------------------------------------- Running TestSuite Tests run: 39, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 7.217 sec <<< FAILURE! Results : Failed tests: formatDate(net.sourceforge.openutils.elfunctions.JspTest) Tests run: 39, Failures: 1, Errors: 0, Skipped: 0 [ERROR] There are test failures. Please refer to <https://hudson.openmindonline.it/job/openutils-elfunctions/ws/openutils-elfunctions/target/surefire-reports> for the individual test results. [HUDSON] Recording test results [INFO] [jar:jar {execution: default-jar}] [INFO] Building jar: <https://hudson.openmindonline.it/job/openutils-elfunctions/ws/openutils-elfunctions/target/openutils-elfunctions-1.1.2-SNAPSHOT.jar> [INFO] Preparing source:jar [WARNING] Removing: jar from forked lifecycle, to prevent recursive invocation. [INFO] No goals needed for project - skipping [INFO] [source:jar {execution: attach-sources}] [INFO] Building jar: <https://hudson.openmindonline.it/job/openutils-elfunctions/ws/openutils-elfunctions/target/openutils-elfunctions-1.1.2-SNAPSHOT-sources.jar> [INFO] [assembly:single {execution: bundle}] [INFO] Reading assembly descriptor: <https://hudson.openmindonline.it/job/openutils-elfunctions/ws/openutils-elfunctions/src/main/assembly/assembly-bundle.xml> [INFO] Building zip: <https://hudson.openmindonline.it/job/openutils-elfunctions/ws/openutils-elfunctions/target/openutils-elfunctions-1.1.2-SNAPSHOT-bundle.zip> [INFO] [license:check {execution: default}] [INFO] Checking licenses... [INFO] Missing header in: <https://hudson.openmindonline.it/job/openutils-elfunctions/ws/openutils-elfunctions/src/test/java/net/sourceforge/openutils/elfunctions/ElStringUtilsTest.java> [HUDSON] Archiving <https://hudson.openmindonline.it/job/openutils-elfunctions/ws/openutils-elfunctions/pom.xml> to /data/hudson-data/jobs/openutils-elfunctions/modules/net.sourceforge.openutils$openutils-elfunctions/builds/2010-10-27_18-44-13/archive/net.sourceforge.openutils/openutils-elfunctions/1.1.2-SNAPSHOT/pom.xml [HUDSON] Archiving <https://hudson.openmindonline.it/job/openutils-elfunctions/ws/openutils-elfunctions/target/openutils-elfunctions-1.1.2-SNAPSHOT.jar> to /data/hudson-data/jobs/openutils-elfunctions/modules/net.sourceforge.openutils$openutils-elfunctions/builds/2010-10-27_18-44-13/archive/net.sourceforge.openutils/openutils-elfunctions/1.1.2-SNAPSHOT/openutils-elfunctions-1.1.2-SNAPSHOT.jar [HUDSON] Archiving <https://hudson.openmindonline.it/job/openutils-elfunctions/ws/openutils-elfunctions/target/openutils-elfunctions-1.1.2-SNAPSHOT-sources.jar> to /data/hudson-data/jobs/openutils-elfunctions/modules/net.sourceforge.openutils$openutils-elfunctions/builds/2010-10-27_18-44-13/archive/net.sourceforge.openutils/openutils-elfunctions/1.1.2-SNAPSHOT/openutils-elfunctions-1.1.2-SNAPSHOT-sources.jar [HUDSON] Archiving <https://hudson.openmindonline.it/job/openutils-elfunctions/ws/openutils-elfunctions/target/openutils-elfunctions-1.1.2-SNAPSHOT-bundle.zip> to /data/hudson-data/jobs/openutils-elfunctions/modules/net.sourceforge.openutils$openutils-elfunctions/builds/2010-10-27_18-44-13/archive/net.sourceforge.openutils/openutils-elfunctions/1.1.2-SNAPSHOT/openutils-elfunctions-1.1.2-SNAPSHOT-bundle.zip [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Some files do not have the expected license header [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 31 seconds [INFO] Finished at: Wed Oct 27 18:44:48 CEST 2010 [INFO] Final Memory: 41M/262M [INFO] ------------------------------------------------------------------------ Sending e-mails to: ope...@li... channel stopped |
From: <mmu...@us...> - 2010-10-27 16:36:58
|
Revision: 3124 http://openutils.svn.sourceforge.net/openutils/?rev=3124&view=rev Author: mmunaretto Date: 2010-10-27 16:36:52 +0000 (Wed, 27 Oct 2010) Log Message: ----------- added simple hyphenation function Modified Paths: -------------- trunk/openutils-elfunctions/src/main/java/net/sourceforge/openutils/elfunctions/ElStringUtils.java trunk/openutils-elfunctions/src/main/resources/META-INF/stringutils.tld Added Paths: ----------- trunk/openutils-elfunctions/src/test/java/net/sourceforge/openutils/elfunctions/ElStringUtilsTest.java Modified: trunk/openutils-elfunctions/src/main/java/net/sourceforge/openutils/elfunctions/ElStringUtils.java =================================================================== --- trunk/openutils-elfunctions/src/main/java/net/sourceforge/openutils/elfunctions/ElStringUtils.java 2010-10-27 16:17:33 UTC (rev 3123) +++ trunk/openutils-elfunctions/src/main/java/net/sourceforge/openutils/elfunctions/ElStringUtils.java 2010-10-27 16:36:52 UTC (rev 3124) @@ -263,7 +263,7 @@ return string; } } - + /** * Wrapper function for NumberUtils.isNumber * @param string @@ -273,4 +273,35 @@ { return NumberUtils.isNumber(string); } + + /** + * This function splits the toHyphen string in to more lines by inserting a '\n' characters between spaces. Words + * aren't really hyphenated, the string is split every numberOfChars characters if possible, otherwise it is split + * at the last space before numberOfChars. + * @param toHyphen is the string to split in more line + * @param numberOfChars is the number of maximum characters allowed for line + * @return a string with a '\n' character + */ + public static String simpleHyphenation(String toHyphen, int numberOfChars) + { + String hyphened = StringUtils.EMPTY; + String[] tokens = toHyphen.split(" "); + hyphened = tokens[0]; + int lineNumber = 1; + for (int i = 1; i < tokens.length; i++) + { + if ((hyphened.length() + tokens[i].length()) > (numberOfChars * lineNumber)) + { + hyphened += "\n"; + lineNumber++; + } + else + { + hyphened += " "; + } + hyphened += tokens[i]; + } + + return hyphened; + } } Modified: trunk/openutils-elfunctions/src/main/resources/META-INF/stringutils.tld =================================================================== --- trunk/openutils-elfunctions/src/main/resources/META-INF/stringutils.tld 2010-10-27 16:17:33 UTC (rev 3123) +++ trunk/openutils-elfunctions/src/main/resources/META-INF/stringutils.tld 2010-10-27 16:36:52 UTC (rev 3124) @@ -199,4 +199,10 @@ <function-class>net.sourceforge.openutils.elfunctions.ElStringUtils</function-class> <function-signature>java.lang.Boolean isNumber(java.lang.String)</function-signature> </function> + <function> + <name>simpleHyphenation</name> + <description>his function splits a string in to more lines of #characters</description> + <function-class>net.sourceforge.openutils.elfunctions.ElStringUtils</function-class> + <function-signature>java.lang.String simpleHyphenation(java.lang.String, int)</function-signature> + </function> </taglib> \ No newline at end of file Added: trunk/openutils-elfunctions/src/test/java/net/sourceforge/openutils/elfunctions/ElStringUtilsTest.java =================================================================== --- trunk/openutils-elfunctions/src/test/java/net/sourceforge/openutils/elfunctions/ElStringUtilsTest.java (rev 0) +++ trunk/openutils-elfunctions/src/test/java/net/sourceforge/openutils/elfunctions/ElStringUtilsTest.java 2010-10-27 16:36:52 UTC (rev 3124) @@ -0,0 +1,45 @@ +package net.sourceforge.openutils.elfunctions; + +import org.testng.Assert; +import org.testng.annotations.Test; + + +public class ElStringUtilsTest +{ + + @Test + public void testOneWord() + { + String toHyphen = "word"; + int numberOfChars = 20; + String hyphened = ElStringUtils.simpleHyphenation(toHyphen, numberOfChars); + Assert.assertEquals(toHyphen, hyphened); + } + + @Test + public void testNoHyphen() + { + String toHyphen = "word"; + int numberOfChars = 3; + String hyphened = ElStringUtils.simpleHyphenation(toHyphen, numberOfChars); + Assert.assertEquals(toHyphen, hyphened); + } + + @Test + public void testHyphenInASpace() + { + String toHyphen = "Hello, word"; + int numberOfChars = 6; + String hyphened = ElStringUtils.simpleHyphenation(toHyphen, numberOfChars); + Assert.assertEquals("Hello,\nword", hyphened); + } + + @Test + public void testHyphenInAWord() + { + String toHyphen = "Hello, word! How are you?"; + int numberOfChars = 7; + String hyphened = ElStringUtils.simpleHyphenation(toHyphen, numberOfChars); + Assert.assertEquals("Hello,\nword!\nHow are\nyou?", hyphened); + } +} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mmu...@us...> - 2010-10-27 16:17:39
|
Revision: 3123 http://openutils.svn.sourceforge.net/openutils/?rev=3123&view=rev Author: mmunaretto Date: 2010-10-27 16:17:33 +0000 (Wed, 27 Oct 2010) Log Message: ----------- udpated mgnlmobile, mgnlcriteria and mgnlmedia version Modified Paths: -------------- trunk/magnolia-test-webapp/pom.xml Modified: trunk/magnolia-test-webapp/pom.xml =================================================================== --- trunk/magnolia-test-webapp/pom.xml 2010-10-27 11:19:08 UTC (rev 3122) +++ trunk/magnolia-test-webapp/pom.xml 2010-10-27 16:17:33 UTC (rev 3123) @@ -117,7 +117,7 @@ <dependency> <groupId>net.sourceforge.openutils</groupId> <artifactId>openutils-mgnlcriteria</artifactId> - <version>3.0.3-SNAPSHOT</version> + <version>3.1.1-SNAPSHOT</version> </dependency> <dependency> <groupId>net.sourceforge.openutils</groupId> @@ -137,7 +137,7 @@ <dependency> <groupId>net.sourceforge.openutils</groupId> <artifactId>openutils-mgnlmedia</artifactId> - <version>4.3-b3-SNAPSHOT</version> + <version>4.3.1-SNAPSHOT</version> </dependency> <dependency> <groupId>net.sourceforge.openutils</groupId> @@ -218,7 +218,7 @@ <dependency> <groupId>net.sourceforge.openutils</groupId> <artifactId>openutils-mgnlmobile</artifactId> - <version>0.0.1-SNAPSHOT</version> + <version>1.0.1-SNAPSHOT</version> </dependency> </dependencies> <dependencyManagement> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2010-10-27 11:19:16
|
Revision: 3122 http://openutils.svn.sourceforge.net/openutils/?rev=3122&view=rev Author: fgiust Date: 2010-10-27 11:19:08 +0000 (Wed, 27 Oct 2010) Log Message: ----------- [maven-release-plugin] prepare for next development iteration Modified Paths: -------------- trunk/openutils-mgnlcriteria/pom.xml Modified: trunk/openutils-mgnlcriteria/pom.xml =================================================================== --- trunk/openutils-mgnlcriteria/pom.xml 2010-10-27 11:19:00 UTC (rev 3121) +++ trunk/openutils-mgnlcriteria/pom.xml 2010-10-27 11:19:08 UTC (rev 3122) @@ -8,7 +8,7 @@ </parent> <artifactId>openutils-mgnlcriteria</artifactId> <name>Magnolia Criteria API</name> - <version>3.1.0</version> + <version>3.1.1-SNAPSHOT</version> <inceptionYear>2009</inceptionYear> <description>A Hibernate's Criteria-like API to programmatically generate JCR queries with Magnolia</description> <licenses> @@ -23,9 +23,9 @@ <url>http://jira.openmindlab.com/browse/CRIT</url> </issueManagement> <scm> - <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-mgnlcriteria-3.1.0</connection> - <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-mgnlcriteria-3.1.0</developerConnection> - <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-mgnlcriteria-3.1.0</url> + <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/trunk/openutils-mgnlcriteria</connection> + <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/trunk/openutils-mgnlcriteria</developerConnection> + <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/trunk/openutils-mgnlcriteria</url> </scm> <build> <plugins> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2010-10-27 11:19:06
|
Revision: 3121 http://openutils.svn.sourceforge.net/openutils/?rev=3121&view=rev Author: fgiust Date: 2010-10-27 11:19:00 +0000 (Wed, 27 Oct 2010) Log Message: ----------- [maven-release-plugin] copy for tag openutils-mgnlcriteria-3.1.0 Added Paths: ----------- tags/openutils-mgnlcriteria-3.1.0/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2010-10-27 11:18:46
|
Revision: 3120 http://openutils.svn.sourceforge.net/openutils/?rev=3120&view=rev Author: fgiust Date: 2010-10-27 11:18:40 +0000 (Wed, 27 Oct 2010) Log Message: ----------- [maven-release-plugin] prepare release openutils-mgnlcriteria-3.1.0 Modified Paths: -------------- trunk/openutils-mgnlcriteria/pom.xml Modified: trunk/openutils-mgnlcriteria/pom.xml =================================================================== --- trunk/openutils-mgnlcriteria/pom.xml 2010-10-27 11:16:36 UTC (rev 3119) +++ trunk/openutils-mgnlcriteria/pom.xml 2010-10-27 11:18:40 UTC (rev 3120) @@ -8,7 +8,7 @@ </parent> <artifactId>openutils-mgnlcriteria</artifactId> <name>Magnolia Criteria API</name> - <version>3.0.3-SNAPSHOT</version> + <version>3.1.0</version> <inceptionYear>2009</inceptionYear> <description>A Hibernate's Criteria-like API to programmatically generate JCR queries with Magnolia</description> <licenses> @@ -23,9 +23,9 @@ <url>http://jira.openmindlab.com/browse/CRIT</url> </issueManagement> <scm> - <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/trunk/openutils-mgnlcriteria</connection> - <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/trunk/openutils-mgnlcriteria</developerConnection> - <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/trunk/openutils-mgnlcriteria</url> + <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-mgnlcriteria-3.1.0</connection> + <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/tags/openutils-mgnlcriteria-3.1.0</developerConnection> + <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/tags/openutils-mgnlcriteria-3.1.0</url> </scm> <build> <plugins> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2010-10-27 11:16:42
|
Revision: 3119 http://openutils.svn.sourceforge.net/openutils/?rev=3119&view=rev Author: fgiust Date: 2010-10-27 11:16:36 +0000 (Wed, 27 Oct 2010) Log Message: ----------- CRIT-29 Remove the dependency on the jcr 2.0 API jar Modified Paths: -------------- trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/advanced/impl/AccessibleResultItemResultIterator.java trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/advanced/impl/AdvancedResultItemImpl.java trunk/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/advanced/ScoreAnalizerAndSortTest.java Modified: trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/advanced/impl/AccessibleResultItemResultIterator.java =================================================================== --- trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/advanced/impl/AccessibleResultItemResultIterator.java 2010-10-25 09:58:25 UTC (rev 3118) +++ trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/advanced/impl/AccessibleResultItemResultIterator.java 2010-10-27 11:16:36 UTC (rev 3119) @@ -24,11 +24,15 @@ import java.util.NoSuchElementException; +import javax.jcr.ItemNotFoundException; import javax.jcr.query.RowIterator; import net.sourceforge.openutils.mgnlcriteria.jcr.query.AdvancedResultItem; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + /** * @author dschivo * @version $Id$ @@ -37,6 +41,11 @@ { /** + * Logger. + */ + private Logger log = LoggerFactory.getLogger(AccessibleResultItemResultIterator.class); + + /** * Local variable storing the next accessible result. Method hasNext() fetches it, method next() resets it. */ private AdvancedResultItem next; @@ -74,9 +83,18 @@ } catch (RuntimeException e) { - // if it is an access-denied exception then ignore it - if (!(e.getCause() instanceof AccessDeniedException)) + + if (e.getCause() instanceof AccessDeniedException) { + // if it is an access-denied exception then ignore it + } + else if (e.getCause() instanceof ItemNotFoundException) + { + // if it is an access-denied exception then ignore it + log.warn("Ignoring invalid node while iterating {}", e.getCause().getMessage()); + } + else + { throw e; } } Modified: trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/advanced/impl/AdvancedResultItemImpl.java =================================================================== --- trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/advanced/impl/AdvancedResultItemImpl.java 2010-10-25 09:58:25 UTC (rev 3118) +++ trunk/openutils-mgnlcriteria/src/main/java/net/sourceforge/openutils/mgnlcriteria/advanced/impl/AdvancedResultItemImpl.java 2010-10-27 11:16:36 UTC (rev 3119) @@ -19,7 +19,6 @@ package net.sourceforge.openutils.mgnlcriteria.advanced.impl; -import info.magnolia.cms.core.Content; import info.magnolia.cms.core.HierarchyManager; import info.magnolia.cms.security.AccessDeniedException; @@ -33,7 +32,7 @@ import net.sourceforge.openutils.mgnlcriteria.jcr.query.AdvancedResultItem; -import org.apache.commons.lang.StringUtils; +import org.apache.commons.beanutils.PropertyUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -50,69 +49,27 @@ /** * Logger. */ - private Logger log = LoggerFactory.getLogger(AdvancedResultItemImpl.class); + private static Logger log = LoggerFactory.getLogger(AdvancedResultItemImpl.class); - private final static Method JCR_ROW_GETNODE; - - private final static Method JCR_ROW_GETSCORE; - - static + private static Item getJCRNode(Row row) throws RepositoryException { - Method jcrRowGetNode = null; + try { - jcrRowGetNode = Row.class.getDeclaredMethod("getNode", (Class[]) null); + return (Item) PropertyUtils.getProperty(row, "node"); } - catch (SecurityException e) + catch (IllegalAccessException e) { } - catch (NoSuchMethodException e) + catch (InvocationTargetException e) { } - JCR_ROW_GETNODE = jcrRowGetNode; - - Method jcrRowGetScore = null; - try - { - jcrRowGetScore = Row.class.getDeclaredMethod("getScore", new Class[]{String.class }); - } - catch (SecurityException e) - { - } catch (NoSuchMethodException e) { + log + .error("Unsupported version of jackrabbit detected, you need at least 1.6.x or a jcr 2.0 compliant version"); } - JCR_ROW_GETSCORE = jcrRowGetScore; - } - public static Item getJCRNode(Row row, HierarchyManager hierarchyManager) throws RepositoryException - { - if (JCR_ROW_GETNODE != null) - { - try - { - return (Item) JCR_ROW_GETNODE.invoke(row, (Object[]) null); - } - catch (IllegalAccessException e) - { - } - catch (InvocationTargetException e) - { - } - } - else - { - Value path = row.getValue("jcr:path"); - if (path != null && StringUtils.isNotBlank(path.getString())) - { - Content node = hierarchyManager.getContent(path.getString()); - if (node != null) - { - return node.getJCRNode(); - } - } - - } return null; } @@ -130,7 +87,7 @@ throws RepositoryException, AccessDeniedException { - super(getJCRNode(row, hierarchyManager), hierarchyManager); + super(getJCRNode(row), hierarchyManager); this.row = row; } @@ -181,7 +138,25 @@ */ public double getScore() { - return getScore("."); + try + { + return (Double) PropertyUtils.getSimpleProperty(row, "score"); + } + catch (IllegalAccessException e) + { + log.warn("Error getting score for {}", this.getHandle(), e); + } + catch (InvocationTargetException e) + { + log.warn("Error getting score for {}", this.getHandle(), e); + } + catch (NoSuchMethodException e) + { + log + .error("Unsupported version of jackrabbit detected, you need at least 1.6.x or a jcr 2.0 compliant version"); + } + + return 0; } /** @@ -189,50 +164,51 @@ */ public double getScore(String selector) { - if (JCR_ROW_GETSCORE != null) + + Method jcrRowGetScore = null; + try { + jcrRowGetScore = row.getClass().getDeclaredMethod("getScore", new Class[]{String.class }); + jcrRowGetScore.setAccessible(true); + } + catch (SecurityException e) + { + } + catch (NoSuchMethodException e) + { + } + + if (jcrRowGetScore != null) + { try { - return (Double) JCR_ROW_GETSCORE.invoke(row, new Object[]{selector }); + if (selector == null) + { + return (Double) PropertyUtils.getSimpleProperty(row, "score"); + } + return (Double) jcrRowGetScore.invoke(row, new Object[]{selector }); } catch (IllegalArgumentException e) { - log.warn("Error getting score for {}", this.getHandle(), e); + log.warn("Error getting score for " + this.getHandle(), e); } catch (IllegalAccessException e) { - log.warn("Error getting score for {}", this.getHandle(), e); + log.warn("Error getting score for " + this.getHandle(), e); } catch (InvocationTargetException e) { - log.warn("Error getting score for {}", this.getHandle(), e); + log.warn("Error getting score for " + this.getHandle(), e.getTargetException()); } + catch (NoSuchMethodException e) + { + log.warn("Error getting score for " + this.getHandle(), e); + } } else { - Value scoreValue; - try - { - scoreValue = row.getValue("jcr:score(" + selector + ")"); - } - catch (RepositoryException e) - { - log.warn("Error getting excerpt for " + this.getHandle(), e); - return 0; - } - - if (scoreValue != null) - { - try - { - return scoreValue.getDouble(); - } - catch (RepositoryException e) - { - log.warn("Error getting score for " + this.getHandle(), e); - return 0; - } - } + log + .error("Unsupported version of jackrabbit detected, you need at least 1.6.x or a jcr 2.0 compliant version"); } return 0; } Modified: trunk/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/advanced/ScoreAnalizerAndSortTest.java =================================================================== --- trunk/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/advanced/ScoreAnalizerAndSortTest.java 2010-10-25 09:58:25 UTC (rev 3118) +++ trunk/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/advanced/ScoreAnalizerAndSortTest.java 2010-10-27 11:16:36 UTC (rev 3119) @@ -29,6 +29,8 @@ import java.util.List; import net.sourceforge.openutils.mgnlcriteria.jcr.query.AdvancedResult; +import net.sourceforge.openutils.mgnlcriteria.jcr.query.AdvancedResultItem; +import net.sourceforge.openutils.mgnlcriteria.jcr.query.ResultIterator; import net.sourceforge.openutils.mgnlcriteria.tests.CriteriaTestUtils; import org.testng.Assert; @@ -80,6 +82,16 @@ Collection< ? extends Content> result = CriteriaTestUtils.collectCollectionFromResult(advResult); CriteriaTestUtils.assertNumOfResults(3, result, "fagiano"); + + ResultIterator<AdvancedResultItem> iterator = advResult.getItems(); + + Assert.assertTrue(iterator.next().getScore() > iterator.next().getScore()); + + iterator = advResult.getItems(); + + // not sure what the selector name "s" means, but that's the only valid selector for this query, according to + // jackrabbit + Assert.assertTrue(iterator.next().getScore("s") > iterator.next().getScore("s")); } @Test This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <mol...@us...> - 2010-10-25 09:58:31
|
Revision: 3118 http://openutils.svn.sourceforge.net/openutils/?rev=3118&view=rev Author: molaschi Date: 2010-10-25 09:58:25 +0000 (Mon, 25 Oct 2010) Log Message: ----------- improve caching concurrent checks Modified Paths: -------------- trunk/openutils-mgnlcache/src/main/java/net/sourceforge/openutils/mgnlsimplecache/filesystem/FSCacheManager.java trunk/openutils-mgnlcache/src/main/java/net/sourceforge/openutils/mgnlsimplecache/filesystem/FSCachedItem.java trunk/openutils-mgnlcache/src/main/java/net/sourceforge/openutils/mgnlsimplecache/filters/CacheFilter.java trunk/openutils-mgnlcache/src/main/java/net/sourceforge/openutils/mgnlsimplecache/lock/LockableCacheContent.java trunk/openutils-mgnlcache/src/main/java/net/sourceforge/openutils/mgnlsimplecache/lock/SynchCacheContentOperations.java Modified: trunk/openutils-mgnlcache/src/main/java/net/sourceforge/openutils/mgnlsimplecache/filesystem/FSCacheManager.java =================================================================== --- trunk/openutils-mgnlcache/src/main/java/net/sourceforge/openutils/mgnlsimplecache/filesystem/FSCacheManager.java 2010-10-12 14:02:23 UTC (rev 3117) +++ trunk/openutils-mgnlcache/src/main/java/net/sourceforge/openutils/mgnlsimplecache/filesystem/FSCacheManager.java 2010-10-25 09:58:25 UTC (rev 3118) @@ -455,9 +455,7 @@ // wait that every rw operation finished for (String key : contents.keySet()) { - contents.get(key).lockToWrite(); - // when i have lock i can remove; - contents.get(key).releaseLockToWrite(); + contents.get(key).waitForWritingLock(); } contents.clear(); Modified: trunk/openutils-mgnlcache/src/main/java/net/sourceforge/openutils/mgnlsimplecache/filesystem/FSCachedItem.java =================================================================== --- trunk/openutils-mgnlcache/src/main/java/net/sourceforge/openutils/mgnlsimplecache/filesystem/FSCachedItem.java 2010-10-12 14:02:23 UTC (rev 3117) +++ trunk/openutils-mgnlcache/src/main/java/net/sourceforge/openutils/mgnlsimplecache/filesystem/FSCachedItem.java 2010-10-25 09:58:25 UTC (rev 3118) @@ -173,11 +173,14 @@ */ public ResetableBufferedOutputStream beginWrite() throws IOException { - lockToWrite(); - isnew = false; - File f = new File(filename); - f.getParentFile().mkdirs(); - return new ResetableBufferedFileOutputStream(f, this); + if (lockToWrite()) + { + isnew = false; + File f = new File(filename); + f.getParentFile().mkdirs(); + return new ResetableBufferedFileOutputStream(f, this); + } + return null; } /** @@ -185,63 +188,67 @@ */ public boolean endWrite(OutputStream outputStream) throws IOException { - IOUtils.closeQuietly(outputStream); - - File f = ((ResetableBufferedFileOutputStream) outputStream).getFile(); - if (f.exists() && f.length() > 0) + try { - FileInputStream fis = new FileInputStream(f); - byte[] gzipControlChars = new byte[2]; - fis.read(gzipControlChars); - IOUtils.closeQuietly(fis); + IOUtils.closeQuietly(outputStream); - if (isGZipped(gzipControlChars)) + File f = ((ResetableBufferedFileOutputStream) outputStream).getFile(); + if (f != null && f.exists() && f.length() > 0) { - FileUtils.moveFile(new File(filename), new File(filenameGzip)); - File fgz = new File(filenameGzip); - f = new File(filename); - InputStream is = new GZIPInputStream(new FileInputStream(fgz)); - OutputStream os = new BufferedOutputStream(new FileOutputStream(f)); - IOUtils.copyLarge(is, os); - IOUtils.closeQuietly(is); - IOUtils.closeQuietly(os); - } - else if (gzipable) - { - File fgz = new File(filenameGzip); - OutputStream os = new GZIPOutputStream(new FileOutputStream(fgz)); - InputStream is = new FileInputStream(f); - IOUtils.copyLarge(is, os); - IOUtils.closeQuietly(is); - IOUtils.closeQuietly(os); - } + FileInputStream fis = new FileInputStream(f); + byte[] gzipControlChars = new byte[2]; + fis.read(gzipControlChars); + IOUtils.closeQuietly(fis); - size = new File(filename).length(); - sizeGzip = new File(filenameGzip).length(); + if (isGZipped(gzipControlChars)) + { + FileUtils.moveFile(new File(filename), new File(filenameGzip)); + File fgz = new File(filenameGzip); + f = new File(filename); + InputStream is = new GZIPInputStream(new FileInputStream(fgz)); + OutputStream os = new BufferedOutputStream(new FileOutputStream(f)); + IOUtils.copyLarge(is, os); + IOUtils.closeQuietly(is); + IOUtils.closeQuietly(os); + } + else if (gzipable) + { + File fgz = new File(filenameGzip); + OutputStream os = new GZIPOutputStream(new FileOutputStream(fgz)); + InputStream is = new FileInputStream(f); + IOUtils.copyLarge(is, os); + IOUtils.closeQuietly(is); + IOUtils.closeQuietly(os); + } - getCacheHeaders().getHeaders().put("x-server-cached", "true"); + size = new File(filename).length(); + sizeGzip = new File(filenameGzip).length(); - OutputStream os = new BufferedOutputStream(new FileOutputStream(new File(filenameHeaders))); - try - { - getCacheHeaders().serialize(os); + getCacheHeaders().getHeaders().put("x-server-cached", "true"); + + OutputStream os = new BufferedOutputStream(new FileOutputStream(new File(filenameHeaders))); + try + { + getCacheHeaders().serialize(os); + } + finally + { + IOUtils.closeQuietly(os); + } + + lastModified = System.currentTimeMillis(); + return true; } - finally - { - IOUtils.closeQuietly(os); - } + size = 0; + sizeGzip = 0; lastModified = System.currentTimeMillis(); + return false; + } + finally + { releaseLockToWrite(); - return true; } - - size = 0; - sizeGzip = 0; - lastModified = System.currentTimeMillis(); - - releaseLockToWrite(); - return false; } /** Modified: trunk/openutils-mgnlcache/src/main/java/net/sourceforge/openutils/mgnlsimplecache/filters/CacheFilter.java =================================================================== --- trunk/openutils-mgnlcache/src/main/java/net/sourceforge/openutils/mgnlsimplecache/filters/CacheFilter.java 2010-10-12 14:02:23 UTC (rev 3117) +++ trunk/openutils-mgnlcache/src/main/java/net/sourceforge/openutils/mgnlsimplecache/filters/CacheFilter.java 2010-10-25 09:58:25 UTC (rev 3118) @@ -142,9 +142,16 @@ // get cache from manager CachedItem cacheContent = cacheManager.get(request); - // if request is cached - if (!cacheContent.isNew()) + OutputStream os = null; + if (cacheContent.isNew()) { + // if someone is writing, returns null + os = cacheContent.beginWrite(); + } + + // if request is cached (not new or cacheContent.beginWrite returns null) + if (os == null) + { InputStream cacheContentInputStream = cacheContent.beginRead(acceptGzip); boolean reset = true; @@ -196,8 +203,6 @@ } } - OutputStream os = cacheContent.beginWrite(); - this.startProcessing(); // wrap response and start writing CacheResponseWrapper cacheContentResponse = new CacheResponseWrapper(response, cacheContent, os); Modified: trunk/openutils-mgnlcache/src/main/java/net/sourceforge/openutils/mgnlsimplecache/lock/LockableCacheContent.java =================================================================== --- trunk/openutils-mgnlcache/src/main/java/net/sourceforge/openutils/mgnlsimplecache/lock/LockableCacheContent.java 2010-10-12 14:02:23 UTC (rev 3117) +++ trunk/openutils-mgnlcache/src/main/java/net/sourceforge/openutils/mgnlsimplecache/lock/LockableCacheContent.java 2010-10-25 09:58:25 UTC (rev 3118) @@ -19,13 +19,17 @@ package net.sourceforge.openutils.mgnlsimplecache.lock; +import java.util.concurrent.TimeUnit; import java.util.concurrent.locks.ReentrantReadWriteLock; import java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock; import java.util.concurrent.locks.ReentrantReadWriteLock.WriteLock; import net.sourceforge.openutils.mgnlsimplecache.managers.CachedItem; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + /** * @author Manuel Molaschi * @author Fabrizio Giustina @@ -34,6 +38,13 @@ public abstract class LockableCacheContent implements CachedItem { + /** + * Logger. + */ + private Logger log = LoggerFactory.getLogger(LockableCacheContent.class); + + private ReentrantReadWriteLock lock = new ReentrantReadWriteLock(); + private ReadLock readLock; private WriteLock writeLock; @@ -43,7 +54,6 @@ */ public LockableCacheContent() { - ReentrantReadWriteLock lock = new ReentrantReadWriteLock(); readLock = lock.readLock(); writeLock = lock.writeLock(); } @@ -53,11 +63,41 @@ readLock.lock(); } - public void lockToWrite() + public boolean lockToWrite() { - writeLock.lock(); + if (lock.isWriteLockedByCurrentThread()) + { + RuntimeException ex = new RuntimeException("Double call to write lock while caching!!!"); + ex.fillInStackTrace(); + log.error("Exception getting lock for writing on cache: ", ex); + throw ex; + } + return writeLock.tryLock(); } + public void waitForWritingLock() + { + if (isWritingLocked()) + { + try + { + writeLock.tryLock(10, TimeUnit.SECONDS); + } + catch (InterruptedException e) + { + + } + finally + { + int holdCount = lock.getWriteHoldCount(); + for (int i = 0; i < holdCount; i++) + { + writeLock.unlock(); + } + } + } + } + public void releaseLockToWrite() { writeLock.unlock(); @@ -67,4 +107,9 @@ { readLock.unlock(); } + + public boolean isWritingLocked() + { + return lock.isWriteLocked(); + } } Modified: trunk/openutils-mgnlcache/src/main/java/net/sourceforge/openutils/mgnlsimplecache/lock/SynchCacheContentOperations.java =================================================================== --- trunk/openutils-mgnlcache/src/main/java/net/sourceforge/openutils/mgnlsimplecache/lock/SynchCacheContentOperations.java 2010-10-12 14:02:23 UTC (rev 3117) +++ trunk/openutils-mgnlcache/src/main/java/net/sourceforge/openutils/mgnlsimplecache/lock/SynchCacheContentOperations.java 2010-10-25 09:58:25 UTC (rev 3118) @@ -54,7 +54,7 @@ public static <T, S> T doWrite(CachedItem cache, S arguments, SynchedOp<T, S> callback) throws Exception { boolean release = false; - if (cache instanceof LockableCacheContent) + if (cache instanceof LockableCacheContent && !((LockableCacheContent) cache).isWritingLocked()) { ((LockableCacheContent) cache).lockToWrite(); release = true; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <fg...@us...> - 2010-10-12 14:02:31
|
Revision: 3117 http://openutils.svn.sourceforge.net/openutils/?rev=3117&view=rev Author: fgiust Date: 2010-10-12 14:02:23 +0000 (Tue, 12 Oct 2010) Log Message: ----------- formatting only - no tabs Modified Paths: -------------- trunk/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/advanced/BasePathTest.java trunk/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/advanced/Content2BeanTest.java trunk/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/advanced/FirstDigitEscapeTest.java trunk/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/advanced/JcrContainsCriteriaSearchTest.java trunk/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/advanced/JcrContainsQuestionMarkTest.java trunk/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/advanced/PaginationTest.java trunk/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/advanced/ScoreAnalizerAndSortTest.java trunk/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/advanced/XpathEscapeTest.java Modified: trunk/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/advanced/BasePathTest.java =================================================================== --- trunk/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/advanced/BasePathTest.java 2010-10-01 09:03:40 UTC (rev 3116) +++ trunk/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/advanced/BasePathTest.java 2010-10-12 14:02:23 UTC (rev 3117) @@ -41,165 +41,142 @@ import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; + /** * Tests criteria queries with different values of basePath parameter. - * * @author dschivo * @version $Id$ */ @RepositoryTestConfiguration(jackrabbitRepositoryConfig = "/crit-repository/jackrabbit-test-configuration.xml", repositoryConfig = "/crit-repository/test-repositories.xml", bootstrapFiles = "/crit-bootstrap/website.Criteria.xml") -public class BasePathTest extends TestNgRepositoryTestcase { +public class BasePathTest extends TestNgRepositoryTestcase +{ - /** - * {@inheritDoc} - */ - @Override - @BeforeClass - public void setUp() throws Exception { - super.setUp(); + /** + * {@inheritDoc} + */ + @Override + @BeforeClass + public void setUp() throws Exception + { + super.setUp(); - // Titles of the nodes in this workspace: - // - Criteria - // --- AbstractCriteriaImpl - // ----- AbstractMagnoliaCriteriaImpl - // ------- MagnoliaCriteriaImpl - // --------- MagnoliaCriteriaWithLimitImpl - // ----- AdvancedCriteriaImpl - // --- AdvancedCriteriaImpl - // --- TranslatableCriteria - // ----- AbstractCriteriaImpl - // ------- AbstractMagnoliaCriteriaImpl - // --------- MagnoliaCriteriaImpl - // ----------- MagnoliaCriteriaWithLimitImpl - // ------- AdvancedCriteriaImpl - MgnlContext.getHierarchyManager(ContentRepository.WEBSITE).save(); - } + // Titles of the nodes in this workspace: + // - Criteria + // --- AbstractCriteriaImpl + // ----- AbstractMagnoliaCriteriaImpl + // ------- MagnoliaCriteriaImpl + // --------- MagnoliaCriteriaWithLimitImpl + // ----- AdvancedCriteriaImpl + // --- AdvancedCriteriaImpl + // --- TranslatableCriteria + // ----- AbstractCriteriaImpl + // ------- AbstractMagnoliaCriteriaImpl + // --------- MagnoliaCriteriaImpl + // ----------- MagnoliaCriteriaWithLimitImpl + // ------- AdvancedCriteriaImpl + MgnlContext.getHierarchyManager(ContentRepository.WEBSITE).save(); + } - /** - * Passing a null basePath should search the entire repository. - * - * @throws Exception - */ - @Test - public void testNullBasePath() throws Exception { - Collection<String> paths = searchPaths(null, "AdvancedCriteriaImpl"); - Assert.assertNotNull(paths); - Assert.assertEquals(paths.size(), 3); - Assert - .assertTrue(paths - .contains("/Criteria/AbstractCriteriaImpl/AdvancedCriteriaImpl")); - Assert.assertTrue(paths.contains("/Criteria/AdvancedCriteriaImpl")); - Assert - .assertTrue(paths - .contains("/Criteria/TranslatableCriteria/AbstractCriteriaImpl/AdvancedCriteriaImpl")); - } + /** + * Passing a null basePath should search the entire repository. + * @throws Exception + */ + @Test + public void testNullBasePath() throws Exception + { + Collection<String> paths = searchPaths(null, "AdvancedCriteriaImpl"); + Assert.assertNotNull(paths); + Assert.assertEquals(paths.size(), 3); + Assert.assertTrue(paths.contains("/Criteria/AbstractCriteriaImpl/AdvancedCriteriaImpl")); + Assert.assertTrue(paths.contains("/Criteria/AdvancedCriteriaImpl")); + Assert.assertTrue(paths.contains("/Criteria/TranslatableCriteria/AbstractCriteriaImpl/AdvancedCriteriaImpl")); + } - /** - * Passing an empty basePath should search the entire repository. - * - * @throws Exception - */ - @Test - public void testEmptyBasePath() throws Exception { - Collection<String> paths = searchPaths(StringUtils.EMPTY, - "AdvancedCriteriaImpl"); - Assert.assertNotNull(paths); - Assert.assertEquals(paths.size(), 3); - Assert - .assertTrue(paths - .contains("/Criteria/AbstractCriteriaImpl/AdvancedCriteriaImpl")); - Assert.assertTrue(paths.contains("/Criteria/AdvancedCriteriaImpl")); - Assert - .assertTrue(paths - .contains("/Criteria/TranslatableCriteria/AbstractCriteriaImpl/AdvancedCriteriaImpl")); - } + /** + * Passing an empty basePath should search the entire repository. + * @throws Exception + */ + @Test + public void testEmptyBasePath() throws Exception + { + Collection<String> paths = searchPaths(StringUtils.EMPTY, "AdvancedCriteriaImpl"); + Assert.assertNotNull(paths); + Assert.assertEquals(paths.size(), 3); + Assert.assertTrue(paths.contains("/Criteria/AbstractCriteriaImpl/AdvancedCriteriaImpl")); + Assert.assertTrue(paths.contains("/Criteria/AdvancedCriteriaImpl")); + Assert.assertTrue(paths.contains("/Criteria/TranslatableCriteria/AbstractCriteriaImpl/AdvancedCriteriaImpl")); + } - /** - * Passing an xpath query ending with /* as the basePath should search the - * children. - * - * @throws Exception - */ - @Test - public void testSearchXpathBasePathWithSingleSlash() throws Exception { - Collection<String> paths = searchPaths( - "//Criteria/AbstractCriteriaImpl/*", StringUtils.EMPTY); - Assert.assertNotNull(paths); - Assert.assertEquals(paths.size(), 2); - Assert - .assertTrue(paths - .contains("/Criteria/AbstractCriteriaImpl/AbstractMagnoliaCriteriaImpl")); - Assert - .assertTrue(paths - .contains("/Criteria/AbstractCriteriaImpl/AdvancedCriteriaImpl")); - } + /** + * Passing an xpath query ending with /* as the basePath should search the children. + * @throws Exception + */ + @Test + public void testSearchXpathBasePathWithSingleSlash() throws Exception + { + Collection<String> paths = searchPaths("//Criteria/AbstractCriteriaImpl/*", StringUtils.EMPTY); + Assert.assertNotNull(paths); + Assert.assertEquals(paths.size(), 2); + Assert.assertTrue(paths.contains("/Criteria/AbstractCriteriaImpl/AbstractMagnoliaCriteriaImpl")); + Assert.assertTrue(paths.contains("/Criteria/AbstractCriteriaImpl/AdvancedCriteriaImpl")); + } - /** - * Passing an xpath query ending with //* as the basePath should search the - * descendants. - * - * @throws Exception - */ - @Test - public void testSearchXpathBasePathWithDoubleSlash() throws Exception { - Collection<String> paths = searchPaths( - "//Criteria/TranslatableCriteria//*", "AdvancedCriteriaImpl"); - Assert.assertNotNull(paths); - Assert.assertEquals(paths.size(), 1); - Assert - .assertTrue(paths - .contains("/Criteria/TranslatableCriteria/AbstractCriteriaImpl/AdvancedCriteriaImpl")); - } + /** + * Passing an xpath query ending with //* as the basePath should search the descendants. + * @throws Exception + */ + @Test + public void testSearchXpathBasePathWithDoubleSlash() throws Exception + { + Collection<String> paths = searchPaths("//Criteria/TranslatableCriteria//*", "AdvancedCriteriaImpl"); + Assert.assertNotNull(paths); + Assert.assertEquals(paths.size(), 1); + Assert.assertTrue(paths.contains("/Criteria/TranslatableCriteria/AbstractCriteriaImpl/AdvancedCriteriaImpl")); + } - /** - * Passing an handle as the basePath should search the descendants. - * - * @throws Exception - */ - @Test - public void testSearchHandleBasePath() throws Exception { - Collection<String> paths = searchPaths( - "/Criteria/TranslatableCriteria", "AdvancedCriteriaImpl"); - Assert.assertNotNull(paths); - Assert.assertEquals(paths.size(), 1); - Assert - .assertTrue(paths - .contains("/Criteria/TranslatableCriteria/AbstractCriteriaImpl/AdvancedCriteriaImpl")); - } + /** + * Passing an handle as the basePath should search the descendants. + * @throws Exception + */ + @Test + public void testSearchHandleBasePath() throws Exception + { + Collection<String> paths = searchPaths("/Criteria/TranslatableCriteria", "AdvancedCriteriaImpl"); + Assert.assertNotNull(paths); + Assert.assertEquals(paths.size(), 1); + Assert.assertTrue(paths.contains("/Criteria/TranslatableCriteria/AbstractCriteriaImpl/AdvancedCriteriaImpl")); + } - /** - * Passing an handle ending with / as the basePath should search the - * descendants. This test makes sure that the resulting xpath query does not - * end with ///* - * - * @throws Exception - */ - @Test - public void testSearchHandleBasePathWithTrailingSlash() throws Exception { - Collection<String> paths = searchPaths( - "/Criteria/TranslatableCriteria/", "AdvancedCriteriaImpl"); - Assert.assertNotNull(paths); - Assert.assertEquals(paths.size(), 1); - Assert - .assertTrue(paths - .contains("/Criteria/TranslatableCriteria/AbstractCriteriaImpl/AdvancedCriteriaImpl")); - } + /** + * Passing an handle ending with / as the basePath should search the descendants. This test makes sure that the + * resulting xpath query does not end with ///* + * @throws Exception + */ + @Test + public void testSearchHandleBasePathWithTrailingSlash() throws Exception + { + Collection<String> paths = searchPaths("/Criteria/TranslatableCriteria/", "AdvancedCriteriaImpl"); + Assert.assertNotNull(paths); + Assert.assertEquals(paths.size(), 1); + Assert.assertTrue(paths.contains("/Criteria/TranslatableCriteria/AbstractCriteriaImpl/AdvancedCriteriaImpl")); + } - private Collection<String> searchPaths(String basePath, String title) { - Criteria criteria = JCRCriteriaFactory.createCriteria().setWorkspace( - ContentRepository.WEBSITE); - criteria.setBasePath(basePath); - criteria - .add(Restrictions.eq(Criterion.JCR_PRIMARYTYPE, "mgnl:content")); - if (!StringUtils.isEmpty(title)) { - criteria.add(Restrictions.eq("@title", title)); - } - AdvancedResult advResult = criteria.execute(); - ResultIterator<AdvancedResultItem> items = advResult.getItems(); - List<String> paths = new ArrayList<String>(); - while (items.hasNext()) { - paths.add(items.next().getHandle()); - } - return paths; - } + private Collection<String> searchPaths(String basePath, String title) + { + Criteria criteria = JCRCriteriaFactory.createCriteria().setWorkspace(ContentRepository.WEBSITE); + criteria.setBasePath(basePath); + criteria.add(Restrictions.eq(Criterion.JCR_PRIMARYTYPE, "mgnl:content")); + if (!StringUtils.isEmpty(title)) + { + criteria.add(Restrictions.eq("@title", title)); + } + AdvancedResult advResult = criteria.execute(); + ResultIterator<AdvancedResultItem> items = advResult.getItems(); + List<String> paths = new ArrayList<String>(); + while (items.hasNext()) + { + paths.add(items.next().getHandle()); + } + return paths; + } } Modified: trunk/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/advanced/Content2BeanTest.java =================================================================== --- trunk/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/advanced/Content2BeanTest.java 2010-10-01 09:03:40 UTC (rev 3116) +++ trunk/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/advanced/Content2BeanTest.java 2010-10-12 14:02:23 UTC (rev 3117) @@ -39,125 +39,123 @@ import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; + /** * Tests for Content2Bean transformation - * * @author fgiust * @version $Id$ */ @RepositoryTestConfiguration(jackrabbitRepositoryConfig = "/crit-repository/jackrabbit-test-configuration.xml", repositoryConfig = "/crit-repository/test-repositories.xml", bootstrapFiles = "/crit-bootstrap/website.contains.xml") -public class Content2BeanTest extends TestNgRepositoryTestcase { +public class Content2BeanTest extends TestNgRepositoryTestcase +{ - /** - * {@inheritDoc} - */ - @Override - @BeforeClass - public void setUp() throws Exception { + /** + * {@inheritDoc} + */ + @Override + @BeforeClass + public void setUp() throws Exception + { - super.setUp(); + super.setUp(); - MgnlContext.getHierarchyManager(ContentRepository.WEBSITE).save(); - } + MgnlContext.getHierarchyManager(ContentRepository.WEBSITE).save(); + } - @SuppressWarnings("unchecked") - @Test - public void testLoremAndIpsum() throws Exception { - Criteria criteria = JCRCriteriaFactory.createCriteria().setWorkspace( - ContentRepository.WEBSITE); - criteria.setBasePath(StringUtils.EMPTY); - criteria.add(Restrictions.eq("@jcr:primaryType", "mgnl:content")); - criteria.add(Restrictions.contains("@title", "lorem ipsum")); - criteria.addOrder(Order.desc("@jcr:score")); + @SuppressWarnings("unchecked") + @Test + public void testLoremAndIpsum() throws Exception + { + Criteria criteria = JCRCriteriaFactory.createCriteria().setWorkspace(ContentRepository.WEBSITE); + criteria.setBasePath(StringUtils.EMPTY); + criteria.add(Restrictions.eq("@jcr:primaryType", "mgnl:content")); + criteria.add(Restrictions.contains("@title", "lorem ipsum")); + criteria.addOrder(Order.desc("@jcr:score")); - AdvancedResult advResult = criteria.execute(); - Assert.assertNotNull(advResult); - Assert.assertEquals(advResult.getTotalSize(), 1); - ResultIterator<AdvancedResultItem> items = advResult.getItems(); - AdvancedResultItem item = items.next(); - Assert.assertEquals(item.getTitle(), "lorem ipsum"); - Assert.assertEquals(item.getHandle(), "/contains/lorem-ipsum"); + AdvancedResult advResult = criteria.execute(); + Assert.assertNotNull(advResult); + Assert.assertEquals(advResult.getTotalSize(), 1); + ResultIterator<AdvancedResultItem> items = advResult.getItems(); + AdvancedResultItem item = items.next(); + Assert.assertEquals(item.getTitle(), "lorem ipsum"); + Assert.assertEquals(item.getHandle(), "/contains/lorem-ipsum"); - // this is also a Map! - Assert.assertEquals(((Map<String, Object>) item).get("title"), - "lorem ipsum"); - Assert.assertEquals(((Map<String, Object>) item).get("text"), "ohoh"); - Assert.assertEquals(((Map<String, Object>) item).get("number"), "5"); - Assert.assertEquals(((Map<String, Object>) item).get("handle"), - "/contains/lorem-ipsum"); + // this is also a Map! + Assert.assertEquals(((Map<String, Object>) item).get("title"), "lorem ipsum"); + Assert.assertEquals(((Map<String, Object>) item).get("text"), "ohoh"); + Assert.assertEquals(((Map<String, Object>) item).get("number"), "5"); + Assert.assertEquals(((Map<String, Object>) item).get("handle"), "/contains/lorem-ipsum"); - ResultIterator<Page> itemsTransformed = advResult.getItems(Page.class); - Assert.assertNotNull(itemsTransformed); - Page page = itemsTransformed.next(); - Assert.assertEquals(page.getTitle(), "lorem ipsum"); - Assert.assertEquals(page.getText(), "ohoh"); - Assert.assertEquals(page.getNumber(), 5); + ResultIterator<Page> itemsTransformed = advResult.getItems(Page.class); + Assert.assertNotNull(itemsTransformed); + Page page = itemsTransformed.next(); + Assert.assertEquals(page.getTitle(), "lorem ipsum"); + Assert.assertEquals(page.getText(), "ohoh"); + Assert.assertEquals(page.getNumber(), 5); - } + } - public static class Page { + public static class Page + { - private String title; + private String title; - private String text; + private String text; - private int number; + private int number; - /** - * Returns the title. - * - * @return the title - */ - public String getTitle() { - return title; - } + /** + * Returns the title. + * @return the title + */ + public String getTitle() + { + return title; + } - /** - * Sets the title. - * - * @param title - * the title to set - */ - public void setTitle(String title) { - this.title = title; - } + /** + * Sets the title. + * @param title the title to set + */ + public void setTitle(String title) + { + this.title = title; + } - /** - * Returns the text. - * - * @return the text - */ - public String getText() { - return text; - } + /** + * Returns the text. + * @return the text + */ + public String getText() + { + return text; + } - /** - * Sets the text. - * - * @param text - * the text to set - */ - public void setText(String text) { - this.text = text; - } + /** + * Sets the text. + * @param text the text to set + */ + public void setText(String text) + { + this.text = text; + } - /** - * Returns the number. - * - * @return the number - */ - public int getNumber() { - return number; - } + /** + * Returns the number. + * @return the number + */ + public int getNumber() + { + return number; + } - /** - * Sets the number. - * - * @param number - * the number to set - */ - public void setNumber(int number) { - this.number = number; - } - } + /** + * Sets the number. + * @param number the number to set + */ + public void setNumber(int number) + { + this.number = number; + } + } } Modified: trunk/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/advanced/FirstDigitEscapeTest.java =================================================================== --- trunk/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/advanced/FirstDigitEscapeTest.java 2010-10-01 09:03:40 UTC (rev 3116) +++ trunk/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/advanced/FirstDigitEscapeTest.java 2010-10-12 14:02:23 UTC (rev 3117) @@ -35,41 +35,41 @@ import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; + /** * @author dschivo * @version $Id$ */ @RepositoryTestConfiguration(jackrabbitRepositoryConfig = "/crit-repository/jackrabbit-test-configuration.xml", repositoryConfig = "/crit-repository/test-repositories.xml", bootstrapFiles = "/crit-bootstrap/website.myproject.xml") -public class FirstDigitEscapeTest extends TestNgRepositoryTestcase { +public class FirstDigitEscapeTest extends TestNgRepositoryTestcase +{ - /** - * {@inheritDoc} - */ - @Override - @BeforeClass - public void setUp() throws Exception { + /** + * {@inheritDoc} + */ + @Override + @BeforeClass + public void setUp() throws Exception + { - super.setUp(); + super.setUp(); - MgnlContext.getHierarchyManager(ContentRepository.WEBSITE).save(); - } + MgnlContext.getHierarchyManager(ContentRepository.WEBSITE).save(); + } - @Test - public void testEscape() throws Exception { - Criteria criteria = JCRCriteriaFactory.createCriteria().setWorkspace( - ContentRepository.WEBSITE); - criteria - .setBasePath("//myproject/Sport/F1/0a67369b-8cc6-43d8-b2d3-c07b12a2ed5f/versions/*"); - criteria.add(Restrictions.eq("@jcr:primaryType", "mgnl:contentNode")); - criteria.addOrder(Order.desc("@jcr:created")); + @Test + public void testEscape() throws Exception + { + Criteria criteria = JCRCriteriaFactory.createCriteria().setWorkspace(ContentRepository.WEBSITE); + criteria.setBasePath("//myproject/Sport/F1/0a67369b-8cc6-43d8-b2d3-c07b12a2ed5f/versions/*"); + criteria.add(Restrictions.eq("@jcr:primaryType", "mgnl:contentNode")); + criteria.addOrder(Order.desc("@jcr:created")); - AdvancedResult advResult = criteria.execute(); + AdvancedResult advResult = criteria.execute(); - ResultIterator<AdvancedResultItem> resultIterator = advResult - .getItems(); - Assert.assertTrue(resultIterator.hasNext()); - Assert.assertEquals(resultIterator.next().getName(), - "ceb55065-e6cd-451a-8ce0-7e495e7e8fbc"); - } + ResultIterator<AdvancedResultItem> resultIterator = advResult.getItems(); + Assert.assertTrue(resultIterator.hasNext()); + Assert.assertEquals(resultIterator.next().getName(), "ceb55065-e6cd-451a-8ce0-7e495e7e8fbc"); + } } Modified: trunk/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/advanced/JcrContainsCriteriaSearchTest.java =================================================================== --- trunk/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/advanced/JcrContainsCriteriaSearchTest.java 2010-10-01 09:03:40 UTC (rev 3116) +++ trunk/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/advanced/JcrContainsCriteriaSearchTest.java 2010-10-12 14:02:23 UTC (rev 3117) @@ -42,158 +42,176 @@ import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; + /** * @author dschivo - * @version $Id: JcrContainsCriteriaSearchTest.java 2914 2010-08-28 08:14:49Z - * fgiust $ + * @version $Id$ */ @RepositoryTestConfiguration(jackrabbitRepositoryConfig = "/crit-repository/jackrabbit-test-configuration.xml", repositoryConfig = "/crit-repository/test-repositories.xml", bootstrapFiles = "/crit-bootstrap/website.contains.xml") -public class JcrContainsCriteriaSearchTest extends TestNgRepositoryTestcase { +public class JcrContainsCriteriaSearchTest extends TestNgRepositoryTestcase +{ - /** - * {@inheritDoc} - */ - @Override - @BeforeClass - public void setUp() throws Exception { + /** + * {@inheritDoc} + */ + @Override + @BeforeClass + public void setUp() throws Exception + { - super.setUp(); + super.setUp(); - // Titles of the nodes in this workspace: - // - hello test? world - // - hello te?st world - // - hello "Milano" world - // - lorem - // - lorem ipsum - // - dolor sit - // - dolor sit amet - MgnlContext.getHierarchyManager(ContentRepository.WEBSITE).save(); - } + // Titles of the nodes in this workspace: + // - hello test? world + // - hello te?st world + // - hello "Milano" world + // - lorem + // - lorem ipsum + // - dolor sit + // - dolor sit amet + MgnlContext.getHierarchyManager(ContentRepository.WEBSITE).save(); + } - @Test - public void testLoremAndIpsum() throws Exception { - Criteria criteria = criteria("lorem ipsum", false); - AdvancedResult advResult = criteria.execute(); - Assert.assertNotNull(advResult); - Assert.assertEquals(advResult.getTotalSize(), 1); - ResultIterator<AdvancedResultItem> items = advResult.getItems(); - AdvancedResultItem item = items.next(); - Assert.assertEquals(item.getTitle(), "lorem ipsum"); - } + @Test + public void testLoremAndIpsum() throws Exception + { + Criteria criteria = criteria("lorem ipsum", false); + AdvancedResult advResult = criteria.execute(); + Assert.assertNotNull(advResult); + Assert.assertEquals(advResult.getTotalSize(), 1); + ResultIterator<AdvancedResultItem> items = advResult.getItems(); + AdvancedResultItem item = items.next(); + Assert.assertEquals(item.getTitle(), "lorem ipsum"); + } - @Test - public void testLoremAndNotIpsum() throws Exception { - Criteria criteria = criteria("lorem -ipsum", false); - AdvancedResult advResult = criteria.execute(); - Assert.assertNotNull(advResult); - Assert.assertEquals(advResult.getTotalSize(), 1); - ResultIterator<AdvancedResultItem> items = advResult.getItems(); - AdvancedResultItem item = items.next(); - Assert.assertEquals(item.getTitle(), "lorem"); - } + @Test + public void testLoremAndNotIpsum() throws Exception + { + Criteria criteria = criteria("lorem -ipsum", false); + AdvancedResult advResult = criteria.execute(); + Assert.assertNotNull(advResult); + Assert.assertEquals(advResult.getTotalSize(), 1); + ResultIterator<AdvancedResultItem> items = advResult.getItems(); + AdvancedResultItem item = items.next(); + Assert.assertEquals(item.getTitle(), "lorem"); + } - @Test - public void testIpsumOrAmet() throws Exception { - Criteria criteria = criteria("ipsum OR amet", false); - AdvancedResult advResult = criteria.execute(); - Assert.assertNotNull(advResult); - Assert.assertEquals(advResult.getTotalSize(), 2); - ResultIterator<AdvancedResultItem> items = advResult.getItems(); - List<String> titles = new ArrayList<String>(); - while (items.hasNext()) { - titles.add(items.next().getTitle()); - } - Collections.sort(titles); - Assert.assertEquals(titles.get(0), "dolor sit amet"); - Assert.assertEquals(titles.get(1), "lorem ipsum"); - } + @Test + public void testIpsumOrAmet() throws Exception + { + Criteria criteria = criteria("ipsum OR amet", false); + AdvancedResult advResult = criteria.execute(); + Assert.assertNotNull(advResult); + Assert.assertEquals(advResult.getTotalSize(), 2); + ResultIterator<AdvancedResultItem> items = advResult.getItems(); + List<String> titles = new ArrayList<String>(); + while (items.hasNext()) + { + titles.add(items.next().getTitle()); + } + Collections.sort(titles); + Assert.assertEquals(titles.get(0), "dolor sit amet"); + Assert.assertEquals(titles.get(1), "lorem ipsum"); + } - @Test - public void testIpsumOrSitAndAmet() throws Exception { - Criteria criteria = criteria("ipsum OR \"sit AND amet\"", false); - AdvancedResult advResult = criteria.execute(); - Assert.assertNotNull(advResult); - Assert.assertEquals(advResult.getTotalSize(), 2); - ResultIterator<AdvancedResultItem> items = advResult.getItems(); - List<String> titles = new ArrayList<String>(); - while (items.hasNext()) { - titles.add(items.next().getTitle()); - } - Collections.sort(titles); - Assert.assertEquals(titles.get(0), "dolor sit amet"); - Assert.assertEquals(titles.get(1), "lorem ipsum"); - } + @Test + public void testIpsumOrSitAndAmet() throws Exception + { + Criteria criteria = criteria("ipsum OR \"sit AND amet\"", false); + AdvancedResult advResult = criteria.execute(); + Assert.assertNotNull(advResult); + Assert.assertEquals(advResult.getTotalSize(), 2); + ResultIterator<AdvancedResultItem> items = advResult.getItems(); + List<String> titles = new ArrayList<String>(); + while (items.hasNext()) + { + titles.add(items.next().getTitle()); + } + Collections.sort(titles); + Assert.assertEquals(titles.get(0), "dolor sit amet"); + Assert.assertEquals(titles.get(1), "lorem ipsum"); + } - @Test - public void testTest1() throws Exception { - String textEnteredByUser = "test?"; - Criteria criteria = criteria(textEnteredByUser, true); - Assert - .assertEquals( - StringUtils.remove(criteria.toXpathExpression(), ' '), - "//*[((@jcr:primaryType='mgnl:content')and(jcr:contains(@title,'test\\?')))]orderby@jcr:scoredescending"); - AdvancedResult advResult = null; - try { - advResult = criteria.execute(); - } catch (JCRQueryException e) { - Assert.fail("Invalid query. " + e.getMessage()); - } - Assert.assertNotNull(advResult); - Assert.assertEquals(advResult.getTotalSize(), 1); - ResultIterator<AdvancedResultItem> items = advResult.getItems(); - AdvancedResultItem item = items.next(); - Assert.assertEquals(item.getTitle(), "hello test? world"); - } + @Test + public void testTest1() throws Exception + { + String textEnteredByUser = "test?"; + Criteria criteria = criteria(textEnteredByUser, true); + Assert.assertEquals( + StringUtils.remove(criteria.toXpathExpression(), ' '), + "//*[((@jcr:primaryType='mgnl:content')and(jcr:contains(@title,'test\\?')))]orderby@jcr:scoredescending"); + AdvancedResult advResult = null; + try + { + advResult = criteria.execute(); + } + catch (JCRQueryException e) + { + Assert.fail("Invalid query. " + e.getMessage()); + } + Assert.assertNotNull(advResult); + Assert.assertEquals(advResult.getTotalSize(), 1); + ResultIterator<AdvancedResultItem> items = advResult.getItems(); + AdvancedResultItem item = items.next(); + Assert.assertEquals(item.getTitle(), "hello test? world"); + } - @Test - public void testTest2() throws Exception { - String textEnteredByUser = "te?st"; - Criteria criteria = criteria(textEnteredByUser, true); - Assert - .assertEquals( - StringUtils.remove(criteria.toXpathExpression(), ' '), - "//*[((@jcr:primaryType='mgnl:content')and(jcr:contains(@title,'te\\?st')))]orderby@jcr:scoredescending"); - AdvancedResult advResult = null; - try { - advResult = criteria.execute(); - } catch (JCRQueryException e) { - Assert.fail("Invalid query. " + e.getMessage()); - } - Assert.assertNotNull(advResult); - Assert.assertEquals(advResult.getTotalSize(), 1); - ResultIterator<AdvancedResultItem> items = advResult.getItems(); - AdvancedResultItem item = items.next(); - Assert.assertEquals(item.getTitle(), "hello te?st world"); - } + @Test + public void testTest2() throws Exception + { + String textEnteredByUser = "te?st"; + Criteria criteria = criteria(textEnteredByUser, true); + Assert.assertEquals( + StringUtils.remove(criteria.toXpathExpression(), ' '), + "//*[((@jcr:primaryType='mgnl:content')and(jcr:contains(@title,'te\\?st')))]orderby@jcr:scoredescending"); + AdvancedResult advResult = null; + try + { + advResult = criteria.execute(); + } + catch (JCRQueryException e) + { + Assert.fail("Invalid query. " + e.getMessage()); + } + Assert.assertNotNull(advResult); + Assert.assertEquals(advResult.getTotalSize(), 1); + ResultIterator<AdvancedResultItem> items = advResult.getItems(); + AdvancedResultItem item = items.next(); + Assert.assertEquals(item.getTitle(), "hello te?st world"); + } - @Test - public void testMilano() throws Exception { - String textEnteredByUser = "\"Milano\""; - Criteria criteria = criteria(textEnteredByUser, true); - Assert - .assertEquals( - StringUtils.remove(criteria.toXpathExpression(), ' '), - "//*[((@jcr:primaryType='mgnl:content')and(jcr:contains(@title,'\\\"Milano\\\"')))]orderby@jcr:scoredescending"); - AdvancedResult advResult = null; - try { - advResult = criteria.execute(); - } catch (JCRQueryException e) { - Assert.fail("Invalid query. " + e.getMessage()); - } - Assert.assertNotNull(advResult); - Assert.assertEquals(advResult.getTotalSize(), 1); - ResultIterator<AdvancedResultItem> items = advResult.getItems(); - AdvancedResultItem item = items.next(); - Assert.assertEquals(item.getTitle(), "hello \"Milano\" world"); - } + @Test + public void testMilano() throws Exception + { + String textEnteredByUser = "\"Milano\""; + Criteria criteria = criteria(textEnteredByUser, true); + Assert + .assertEquals( + StringUtils.remove(criteria.toXpathExpression(), ' '), + "//*[((@jcr:primaryType='mgnl:content')and(jcr:contains(@title,'\\\"Milano\\\"')))]orderby@jcr:scoredescending"); + AdvancedResult advResult = null; + try + { + advResult = criteria.execute(); + } + catch (JCRQueryException e) + { + Assert.fail("Invalid query. " + e.getMessage()); + } + Assert.assertNotNull(advResult); + Assert.assertEquals(advResult.getTotalSize(), 1); + ResultIterator<AdvancedResultItem> items = advResult.getItems(); + AdvancedResultItem item = items.next(); + Assert.assertEquals(item.getTitle(), "hello \"Milano\" world"); + } - private Criteria criteria(String titleSearch, boolean escape) { - Criteria criteria = JCRCriteriaFactory.createCriteria().setWorkspace( - ContentRepository.WEBSITE); - criteria.setBasePath(StringUtils.EMPTY); - criteria.add(Restrictions.eq("@jcr:primaryType", "mgnl:content")); - criteria.add(Restrictions.contains("@title", titleSearch, escape)); - criteria.addOrder(Order.desc("@jcr:score")); - return criteria; - } + private Criteria criteria(String titleSearch, boolean escape) + { + Criteria criteria = JCRCriteriaFactory.createCriteria().setWorkspace(ContentRepository.WEBSITE); + criteria.setBasePath(StringUtils.EMPTY); + criteria.add(Restrictions.eq("@jcr:primaryType", "mgnl:content")); + criteria.add(Restrictions.contains("@title", titleSearch, escape)); + criteria.addOrder(Order.desc("@jcr:score")); + return criteria; + } } Modified: trunk/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/advanced/JcrContainsQuestionMarkTest.java =================================================================== --- trunk/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/advanced/JcrContainsQuestionMarkTest.java 2010-10-01 09:03:40 UTC (rev 3116) +++ trunk/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/advanced/JcrContainsQuestionMarkTest.java 2010-10-12 14:02:23 UTC (rev 3117) @@ -35,95 +35,91 @@ import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; + /** - * Unit test on escaping quotation mark in jcr:contains(). Unescaped quotation - * marks are not illegal: no Exception is thrown on query execution. All - * quotation marks (not only the trailing one) should be escaped to obatain - * results. - * + * Unit test on escaping quotation mark in jcr:contains(). Unescaped quotation marks are not illegal: no Exception is + * thrown on query execution. All quotation marks (not only the trailing one) should be escaped to obatain results. * @author dschivo - * @version $Id: JcrContainsQuestionMarkTest.java 2933 2010-08-29 16:00:21Z - * fgiust $ + * @version $Id$ */ @RepositoryTestConfiguration(jackrabbitRepositoryConfig = "/crit-repository/jackrabbit-test-configuration.xml", repositoryConfig = "/crit-repository/test-repositories.xml", bootstrapFiles = "/crit-bootstrap/website.contains.xml") -public class JcrContainsQuestionMarkTest extends TestNgRepositoryTestcase { +public class JcrContainsQuestionMarkTest extends TestNgRepositoryTestcase +{ - /** - * {@inheritDoc} - */ - @Override - @BeforeClass - public void setUp() throws Exception { + /** + * {@inheritDoc} + */ + @Override + @BeforeClass + public void setUp() throws Exception + { - super.setUp(); + super.setUp(); - // Titles of the nodes in this workspace: - // - hello test? world - // - hello te?st world - // - hello "Milano" world - // - lorem - // - lorem ipsum - // - dolor sit - // - dolor sit amet - MgnlContext.getHierarchyManager(ContentRepository.WEBSITE).save(); - } + // Titles of the nodes in this workspace: + // - hello test? world + // - hello te?st world + // - hello "Milano" world + // - lorem + // - lorem ipsum + // - dolor sit + // - dolor sit amet + MgnlContext.getHierarchyManager(ContentRepository.WEBSITE).save(); + } - @SuppressWarnings("deprecation") - @Test - public void testTrailingUnescaped() throws Exception { - HierarchyManager hm = MgnlContext - .getHierarchyManager(ContentRepository.WEBSITE); + @SuppressWarnings("deprecation") + @Test + public void testTrailingUnescaped() throws Exception + { + HierarchyManager hm = MgnlContext.getHierarchyManager(ContentRepository.WEBSITE); - AdvancedResultImpl advResult = null; - try { - String stmt = "//*[((@jcr:primaryType='mgnl:content') and (jcr:contains(@title,'test?')))] order by @jcr:score"; - advResult = QueryExecutorHelper.execute(stmt, Query.XPATH, hm, 10, - 0, null); - } catch (JCRQueryException e) { - // The following statement is NOT true: - // A search string like 'test?' will run into a ParseException - // documented in - // http://issues.apache.org/jira/browse/JCR-1248 - Assert.fail("http://issues.apache.org/jira/browse/JCR-1248"); - } + AdvancedResultImpl advResult = null; + try + { + String stmt = "//*[((@jcr:primaryType='mgnl:content') and (jcr:contains(@title,'test?')))] order by @jcr:score"; + advResult = QueryExecutorHelper.execute(stmt, Query.XPATH, hm, 10, 0, null); + } + catch (JCRQueryException e) + { + // The following statement is NOT true: + // A search string like 'test?' will run into a ParseException + // documented in + // http://issues.apache.org/jira/browse/JCR-1248 + Assert.fail("http://issues.apache.org/jira/browse/JCR-1248"); + } - // remark: total size is only evaluated when the result is sorted - Assert.assertEquals(advResult.getTotalSize(), 0); - } + // remark: total size is only evaluated when the result is sorted + Assert.assertEquals(advResult.getTotalSize(), 0); + } - @SuppressWarnings("deprecation") - @Test - public void testTrailingEscaped() throws Exception { - HierarchyManager hm = MgnlContext - .getHierarchyManager(ContentRepository.WEBSITE); + @SuppressWarnings("deprecation") + @Test + public void testTrailingEscaped() throws Exception + { + HierarchyManager hm = MgnlContext.getHierarchyManager(ContentRepository.WEBSITE); - String stmt = "//*[((@jcr:primaryType='mgnl:content') and (jcr:contains(@title,'test\\?')))] order by @jcr:score"; - AdvancedResultImpl advResult = QueryExecutorHelper.execute(stmt, - Query.XPATH, hm, -1, 0, null); + String stmt = "//*[((@jcr:primaryType='mgnl:content') and (jcr:contains(@title,'test\\?')))] order by @jcr:score"; + AdvancedResultImpl advResult = QueryExecutorHelper.execute(stmt, Query.XPATH, hm, -1, 0, null); - Assert.assertEquals(advResult.getTotalSize(), 1); - Assert.assertEquals(advResult.getItems().next().getTitle(), - "hello test? world"); - } + Assert.assertEquals(advResult.getTotalSize(), 1); + Assert.assertEquals(advResult.getItems().next().getTitle(), "hello test? world"); + } - @SuppressWarnings("deprecation") - @Test - public void testMiddle() throws Exception { - HierarchyManager hm = MgnlContext - .getHierarchyManager(ContentRepository.WEBSITE); - String stmt; - AdvancedResultImpl advResult; + @SuppressWarnings("deprecation") + @Test + public void testMiddle() throws Exception + { + HierarchyManager hm = MgnlContext.getHierarchyManager(ContentRepository.WEBSITE); + String stmt; + AdvancedResultImpl advResult; - stmt = "//*[((@jcr:primaryType='mgnl:content') and (jcr:contains(@title,'te?st')))] order by @jcr:score"; - advResult = QueryExecutorHelper.execute(stmt, Query.XPATH, hm, -1, 0, - null); - Assert.assertEquals(advResult.getTotalSize(), 0); + stmt = "//*[((@jcr:primaryType='mgnl:content') and (jcr:contains(@title,'te?st')))] order by @jcr:score"; + advResult = QueryExecutorHelper.execute(stmt, Query.XPATH, hm, -1, 0, null); + Assert.assertEquals(advResult.getTotalSize(), 0); - stmt = "//*[((@jcr:primaryType='mgnl:content') and (jcr:contains(@title,'te\\?st')))] order by @jcr:score"; - advResult = QueryExecutorHelper.execute(stmt, Query.XPATH, hm, -1, 0, - null); - Assert.assertEquals(advResult.getTotalSize(), 1); - Assert.assertEquals(advResult.getItems().next().getTitle(), - "hello te?st world"); - } + stmt = "//*[((@jcr:primaryType='mgnl:content') and (jcr:contains(@title,'te\\?st')))] order by @jcr:score"; + advResult = QueryExecutorHelper.execute(stmt, Query.XPATH, hm, -1, 0, null); + Assert.assertEquals(advResult.getTotalSize(), 1); + Assert.assertEquals(advResult.getItems().next().getTitle(), "hello te?st world"); + } } Modified: trunk/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/advanced/PaginationTest.java =================================================================== --- trunk/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/advanced/PaginationTest.java 2010-10-01 09:03:40 UTC (rev 3116) +++ trunk/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/advanced/PaginationTest.java 2010-10-12 14:02:23 UTC (rev 3117) @@ -35,189 +35,181 @@ import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; + /** * Tests pagination in criteria queries. - * * @author dschivo */ @RepositoryTestConfiguration(jackrabbitRepositoryConfig = "/crit-repository/jackrabbit-test-configuration.xml", repositoryConfig = "/crit-repository/test-repositories.xml", bootstrapFiles = "/crit-bootstrap/website.letters.xml") -public class PaginationTest extends TestNgRepositoryTestcase { +public class PaginationTest extends TestNgRepositoryTestcase +{ - /** - * {@inheritDoc} - */ - @Override - @BeforeClass - public void setUp() throws Exception { + /** + * {@inheritDoc} + */ + @Override + @BeforeClass + public void setUp() throws Exception + { - super.setUp(); + super.setUp(); - // Titles of the nodes in this workspace: - // - Letters - // --- A - // --- B - // --- C - // --- ... - // --- X - // --- Y - // --- Z - MgnlContext.getHierarchyManager(ContentRepository.WEBSITE).save(); - } + // Titles of the nodes in this workspace: + // - Letters + // --- A + // --- B + // --- C + // --- ... + // --- X + // --- Y + // --- Z + MgnlContext.getHierarchyManager(ContentRepository.WEBSITE).save(); + } - /** - * Retrieves all letters. - * - * @throws Exception - */ - @Test - public void testNoPagination() throws Exception { - Criteria criteria = JCRCriteriaFactory.createCriteria().setWorkspace( - ContentRepository.WEBSITE); - criteria.setBasePath("/letters"); - criteria.add(Restrictions.eq("@jcr:primaryType", "mgnl:content")); - criteria.addOrder(Order.asc("@title")); - AdvancedResult advResult = criteria.execute(); + /** + * Retrieves all letters. + * @throws Exception + */ + @Test + public void testNoPagination() throws Exception + { + Criteria criteria = JCRCriteriaFactory.createCriteria().setWorkspace(ContentRepository.WEBSITE); + criteria.setBasePath("/letters"); + criteria.add(Restrictions.eq("@jcr:primaryType", "mgnl:content")); + criteria.addOrder(Order.asc("@title")); + AdvancedResult advResult = criteria.execute(); - Assert.assertEquals(advResult.getTotalSize(), 26); + Assert.assertEquals(advResult.getTotalSize(), 26); - ResultIterator<AdvancedResultItem> resultIterator = advResult - .getItems(); - Assert.assertEquals(resultIterator.getSize(), 26); + ResultIterator<AdvancedResultItem> resultIterator = advResult.getItems(); + Assert.assertEquals(resultIterator.getSize(), 26); - Assert.assertEquals(resultIterator.next().getTitle(), "A"); + Assert.assertEquals(resultIterator.next().getTitle(), "A"); - AdvancedResultItem content = null; - while (resultIterator.hasNext()) { - content = resultIterator.next(); - } - Assert.assertEquals(content.getTitle(), "Z"); - } + AdvancedResultItem content = null; + while (resultIterator.hasNext()) + { + content = resultIterator.next(); + } + Assert.assertEquals(content.getTitle(), "Z"); + } - /** - * Retrieves letters from the tenth on. - * - * @throws Exception - */ - @Test - public void testSetFirstResult() throws Exception { - Criteria criteria = JCRCriteriaFactory.createCriteria().setWorkspace( - ContentRepository.WEBSITE); - criteria.setBasePath("/letters"); - criteria.add(Restrictions.eq("@jcr:primaryType", "mgnl:content")); - criteria.addOrder(Order.asc("@title")); - criteria.setFirstResult(9); - AdvancedResult advResult = criteria.execute(); + /** + * Retrieves letters from the tenth on. + * @throws Exception + */ + @Test + public void testSetFirstResult() throws Exception + { + Criteria criteria = JCRCriteriaFactory.createCriteria().setWorkspace(ContentRepository.WEBSITE); + criteria.setBasePath("/letters"); + criteria.add(Restrictions.eq("@jcr:primaryType", "mgnl:content")); + criteria.addOrder(Order.asc("@title")); + criteria.setFirstResult(9); + AdvancedResult advResult = criteria.execute(); - Assert.assertEquals(advResult.getTotalSize(), 26); + Assert.assertEquals(advResult.getTotalSize(), 26); - ResultIterator<AdvancedResultItem> resultIterator = advResult - .getItems(); - Assert.assertEquals(resultIterator.getSize(), 17); + ResultIterator<AdvancedResultItem> resultIterator = advResult.getItems(); + Assert.assertEquals(resultIterator.getSize(), 17); - Assert.assertEquals(resultIterator.next().getTitle(), "J"); - } + Assert.assertEquals(resultIterator.next().getTitle(), "J"); + } - /** - * Retrieves the first ten letters. - * - * @throws Exception - */ - @Test - public void testSetMaxResults() throws Exception { - Criteria criteria = JCRCriteriaFactory.createCriteria().setWorkspace( - ContentRepository.WEBSITE); - criteria.setBasePath("/letters"); - criteria.add(Restrictions.eq("@jcr:primaryType", "mgnl:content")); - criteria.addOrder(Order.asc("@title")); - criteria.setMaxResults(10); - AdvancedResult advResult = criteria.execute(); + /** + * Retrieves the first ten letters. + * @throws Exception + */ + @Test + public void testSetMaxResults() throws Exception + { + Criteria criteria = JCRCriteriaFactory.createCriteria().setWorkspace(ContentRepository.WEBSITE); + criteria.setBasePath("/letters"); + criteria.add(Restrictions.eq("@jcr:primaryType", "mgnl:content")); + criteria.addOrder(Order.asc("@title")); + criteria.setMaxResults(10); + AdvancedResult advResult = criteria.execute(); - Assert.assertEquals(advResult.getTotalSize(), 26); + Assert.assertEquals(advResult.getTotalSize(), 26); - ResultIterator<AdvancedResultItem> resultIterator = advResult - .getItems(); - Assert.assertEquals(resultIterator.getSize(), 10); + ResultIterator<AdvancedResultItem> resultIterator = advResult.getItems(); + Assert.assertEquals(resultIterator.getSize(), 10); - AdvancedResultItem content = null; - while (resultIterator.hasNext()) { - content = resultIterator.next(); - } - Assert.assertEquals(content.getTitle(), "J"); - } + AdvancedResultItem content = null; + while (resultIterator.hasNext()) + { + content = resultIterator.next(); + } + Assert.assertEquals(content.getTitle(), "J"); + } - /** - * Retrieves the third page of 5 letters. - * - * @throws Exception - */ - @Test - public void testSetPaging() throws Exception { - Criteria criteria = JCRCriteriaFactory.createCriteria().setWorkspace( - ContentRepository.WEBSITE); - criteria.setBasePath("/letters"); - criteria.add(Restrictions.eq("@jcr:primaryType", "mgnl:content")); - criteria.addOrder(Order.asc("@title")); - criteria.setPaging(5, 3); - AdvancedResult advResult = criteria.execute(); + /** + * Retrieves the third page of 5 letters. + * @throws Exception + */ + @Test + public void testSetPaging() throws Exception + { + Criteria criteria = JCRCriteriaFactory.createCriteria().setWorkspace(ContentRepository.WEBSITE); + criteria.setBasePath("/letters"); + criteria.add(Restrictions.eq("@jcr:primaryType", "mgnl:content")); + criteria.addOrder(Order.asc("@title")); + criteria.setPaging(5, 3); + AdvancedResult advResult = criteria.execute(); - Assert.assertEquals(advResult.getTotalSize(), 26); + Assert.assertEquals(advResult.getTotalSize(), 26); - ResultIterator<AdvancedResultItem> resultIterator = advResult - .getItems(); + ResultIterator<AdvancedResultItem> resultIterator = advResult.getItems(); - Assert.assertEquals(resultIterator.getSize(), 5); - Assert.assertEquals(resultIterator.next().getTitle(), "K"); - Assert.assertEquals(resultIterator.next().getTitle(), "L"); - Assert.assertEquals(resultIterator.next().getTitle(), "M"); - Assert.assertEquals(resultIterator.next().getTitle(), "N"); - Assert.assertEquals(resultIterator.next().getTitle(), "O"); - } + Assert.assertEquals(resultIterator.getSize(), 5); + Assert.assertEquals(resultIterator.next().getTitle(), "K"); + Assert.assertEquals(resultIterator.next().getTitle(), "L"); + Assert.assertEquals(resultIterator.next().getTitle(), "M"); + Assert.assertEquals(resultIterator.next().getTitle(), "N"); + Assert.assertEquals(resultIterator.next().getTitle(), "O"); + } - /** - * Retrieves the fourth page of 8 letters. - * - * @throws Exception - */ - @Test - public void testSetPagingLastPage() throws Exception { - Criteria criteria = JCRCriteriaFactory.createCriteria().setWorkspace( - ContentRepository.WEBSITE); - criteria.setBasePath("/letters"); - criteria.add(Restrictions.eq("@jcr:primaryType", "mgnl:content")); - criteria.addOrder(Order.asc("@title")); - criteria.setPaging(8, 4); - AdvancedResult advResult = criteria.execute(); + /** + * Retrieves the fourth page of 8 letters. + * @throws Exception + */ + @Test + public void testSetPagingLastPage() throws Exception + { + Criteria criteria = JCRCriteriaFactory.createCriteria().setWorkspace(ContentRepository.WEBSITE); + criteria.setBasePath("/letters"); + criteria.add(Restrictions.eq("@jcr:primaryType", "mgnl:content")); + criteria.addOrder(Order.asc("@title")); + criteria.setPaging(8, 4); + AdvancedResult advResult = criteria.execute(); - Assert.assertEquals(advResult.getTotalSize(), 26); + Assert.assertEquals(advResult.getTotalSize(), 26); - ResultIterator<AdvancedResultItem> resultIterator = advResult - .getItems(); + ResultIterator<AdvancedResultItem> resultIterator = advResult.getItems(); - Assert.assertEquals(resultIterator.getSize(), 2); - Assert.assertEquals(resultIterator.next().getTitle(), "Y"); - Assert.assertEquals(resultIterator.next().getTitle(), "Z"); - } + Assert.assertEquals(resultIterator.getSize(), 2); + Assert.assertEquals(resultIterator.next().getTitle(), "Y"); + Assert.assertEquals(resultIterator.next().getTitle(), "Z"); + } - /** - * Retrieves the last page of 3 letters. - * - * @throws Exception - */ - @Test - public void testSetPagingEvenPage() throws Exception { - Criteria criteria = JCRCriteriaFactory.createCriteria().setWorkspace( - ContentRepository.WEBSITE); - criteria.setBasePath("/letters"); - criteria.add(Restrictions.eq("@jcr:primaryType", "mgnl:content")); - criteria.addOrder(Order.asc("@title")); - criteria.setPaging(5, 1); + /** + * Retrieves the last page of 3 letters. + * @throws Exception + */ + @Test + public void testSetPagingEvenPage() throws Exception + { + Criteria criteria = JCRCriteriaFactory.createCriteria().setWorkspace(ContentRepository.WEBSITE); + criteria.setBasePath("/letters"); + criteria.add(Restrictions.eq("@jcr:primaryType", "mgnl:content")); + criteria.addOrder(Order.asc("@title")); + criteria.setPaging(5, 1); - AdvancedResult advResult = criteria.execute(); - Assert.assertEquals(advResult.getTotalSize(), 26); - Assert.assertEquals(advResult.getNumberOfPages(), 6); + AdvancedResult advResult = criteria.execute(); + Assert.assertEquals(advResult.getTotalSize(), 26); + Assert.assertEquals(advResult.getNumberOfPages(), 6); - ResultIterator<AdvancedResultItem> resultIterator = advResult - .getItems(); - Assert.assertEquals(resultIterator.getSize(), 5); - } + ResultIterator<AdvancedResultItem> resultIterator = advResult.getItems(); + Assert.assertEquals(resultIterator.getSize(), 5); + } } Modified: trunk/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/advanced/ScoreAnalizerAndSortTest.java =================================================================== --- trunk/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/advanced/ScoreAnalizerAndSortTest.java 2010-10-01 09:03:40 UTC (rev 3116) +++ trunk/openutils-mgnlcriteria/src/test/java/net/sourceforge/openutils/mgnlcriteria/advanced/ScoreAnalizerAndSortTest.java 2010-10-12 14:02:23 UTC (rev 3117) @@ -35,128 +35,132 @@ import org.testng.annotations.BeforeClass; import org.testng.annotations.Test; + /** * @author fgiust - * @version $Id: ScoreAnalizerAndSortTest.java 2916 2010-08-28 09:20:10Z fgiust - * $ + * @version $Id$ */ @RepositoryTestConfiguration(jackrabbitRepositoryConfig = "/crit-repository/jackrabbit-test-configuration.xml", repositoryConfig = "/crit-repository/test-repositories.xml", bootstrapFiles = "/crit-bootstrap/website.00000.xml") -public class ScoreAnalizerAndSortTest extends TestNgRepositoryTestcase { +public class ScoreAnalizerAndSortTest extends TestNgRepositoryTestcase +{ - /** - * {@inheritDoc} - */ - @Override - @BeforeClass - public void setUp() throws Exception { + /** + * {@inheritDoc} + */ + @Override + @BeforeClass + public void setUp() throws Exception + { - super.setUp(); + super.setUp(); - MgnlContext.getHierarchyManager(ContentRepository.WEBSITE).save(); - } + MgnlContext.getHierarchyManager(ContentRepository.WEBSITE).save(); + } - @Test - public void testSearchDante() throws Exception { - // Dante Alighieri - // Alighieri, Dante + @Test + public void testSearchDante() throws Exception + { + // Dante Alighieri + // Alighieri, Dante - AdvancedResult advResult = CriteriaTestUtils.search("Dante Alighieri", - 1, 200); - Collection<? extends Content> result = CriteriaTestUtils - .collectCollectionFromResult(advResult); + AdvancedResult advResult = CriteriaTestUtils.search("Dante Alighieri", 1, 200); + Collection< ? extends Content> result = CriteriaTestUtils.collectCollectionFromResult(advResult); - CriteriaTestUtils.assertNumOfResults(2, result, "Dante Alighieri"); - } + CriteriaTestUtils.assertNumOfResults(2, result, "Dante Alighieri"); + } - @Test - public void testSearchFagiano() throws Exception { - // fagiano - // fagiàno - // fàgiànò + @Test + public void testSearchFagiano() throws Exception + { + // fagiano + // fagiàno + // fàgiànò - AdvancedResult advResult = CriteriaTestUtils.search("fagiano", 1, 200); - Collection<? extends Content> result = CriteriaTestUtils - .collectCollectionFromResult(advResult); + AdvancedResult advResult = CriteriaTestUtils.search("fagiano", 1, 200); + Collection< ? extends Content> result = CriteriaTestUtils.collectCollectionFromResult(advResult); - CriteriaTestUtils.assertNumOfResults(3, result, "fagiano"); - } + CriteriaTestUtils.assertNumOfResults(3, result, "fagiano"); + } - @Test - public void testSearchPesca() throws Exception { - // pèsca - // canna da pesca + @Test + public void testSearchPesca() throws Exception + { + // pèsca + // canna da pesca - AdvancedResult advResult = CriteriaTestUtils.search("pesca", 1, 200); - Collection<? extends Content> result = CriteriaTestUtils - .collectCollectionFromResult(advResult); + AdvancedResult advResult = CriteriaTestUtils.search("pesca", 1, 200); + Collection< ? extends Content> result = CriteriaTestUtils.collectCollectionFromResult(advResult); - CriteriaTestUtils.assertSortedResults(new String[] { "pèsca", - "canna da pesca" }, result, "pesca"); - } + CriteriaTestUtils.assertSortedResults(new String[]{"pèsca", "canna da pesca" }, result, "pesca"); + } - @Test - public void testSearchPageNumber1() throws Exception { - AdvancedResult advResult = CriteriaTestUtils.search("francia", 1, 1); - Assert.assertEquals(advResult.getPage(), 1); - } + @Test + public void testSearchPageNumber1() throws Exception + { + AdvancedResult advResult = CriteriaTestUtils.search("francia", 1, 1); + Assert.assertEquals(advResult.getPage(), 1); + } - // see CRIT-17 - @Test - public void testSearchPageNumber2() throws Exception { - AdvancedResult advResult = CriteriaTestUtils.search("francia", 2, 1); - Assert.assertEquals(advResult.getPage(), 2); - } + // see CRIT-17 + @Test + public void testSearchPageNumber2() throws Exception + { + AdvancedResult advResult = CriteriaTestUtils.search("francia", 2, 1); + Assert.assertEquals(advResult.getPage(), 2); + } - @Test - public void testSearchPageNumber3() throws Exception { - AdvancedResult advResult = CriteriaTestUtils.search("francia", 3, 1); - Assert.assertEquals(advResult.getPage(), 3); - } + @Test + public void testSearchPageNumber3() throws Exception + { + AdvancedResult advResult = CriteriaTestUtils.search("francia", 3, 1); + Assert.assertEquals(advResult.getPage(), 3); + } - @Test - public void testSearchFrancia() throws Exception { - // --- "francia" in titles: - // Frància - // Parigi (Francia) - // Parigi (Frància) + @Test + public void testSearchFrancia() throws Exception + { + // --- "francia" in titles: + // Frància + // Parigi (Francia) + // Parigi (Frància) - // --- "francia" in paragraphs: - // "Tallart, Camille d'Hostun, cónte di-", - // "federale", - // ":)", - // "Faccina sorridente :)" + // --- "francia" in paragraphs: + // "Tallart, Camille d'Hostun, cónte di-", + // "federale", + // ":)", + // "Faccina sorridente :)" - AdvancedResult advResult = CriteriaTestUtils.search("francia", 1, 200); - Collection<? extends Content> result = CriteriaTestUtils - .collectCollectionFromResult(advResult); + AdvancedResult advResult = CriteriaTestUtils.search("francia", 1, 200); + Collection< ? extends Content> result = CriteriaTestUtils.collectCollectionFromResult(advResult); - Assert.assertEquals(advResult.getTotalSize(), 7); + Assert.assertEquals(advResult.getTotalSize(), 7); - // the correct result should be: - // Frància - // Parigi (Francia) - // Parigi (Frància) + // the correct result should be: + // Frància + // Pari... [truncated message content] |
From: <hu...@op...> - 2010-10-02 14:42:49
|
See <https://hudson.openmindonline.it/job/openutils-elfunctions/27/> |
From: <hu...@op...> - 2010-10-02 14:42:49
|
See <https://hudson.openmindonline.it/job/openutils-elfunctions/net.sourceforge.openutils$openutils-elfunctions/27/> |
From: <hu...@op...> - 2010-10-02 13:55:05
|
See <https://hudson.openmindonline.it/job/openutils-mgnlcriteria/119/> ------------------------------------------ Started by an SCM change Updating https://openutils.svn.sourceforge.net/svnroot/openutils/trunk/openutils-mgnlcriteria ERROR: Failed to update https://openutils.svn.sourceforge.net/svnroot/openutils/trunk/openutils-mgnlcriteria org.tmatesoft.svn.core.SVNException: svn: timed out waiting for server svn: REPORT request failed on '/svnroot/openutils/!svn/vcc/default' at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:103) at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:87) at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:616) at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:273) at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:261) at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.doReport(DAVConnection.java:266) at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.doReport(DAVConnection.java:257) at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.getDatedRevision(DAVRepository.java:198) at org.tmatesoft.svn.core.wc.SVNBasicClient.getRevisionNumber(SVNBasicClient.java:477) at org.tmatesoft.svn.core.wc.SVNBasicClient.getRevisionNumber(SVNBasicClient.java:465) at org.tmatesoft.svn.core.wc.SVNUpdateClient.update(SVNUpdateClient.java:541) at org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:401) at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:699) at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:660) at hudson.FilePath.act(FilePath.java:747) at hudson.FilePath.act(FilePath.java:729) at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:653) at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:601) at hudson.model.AbstractProject.checkout(AbstractProject.java:1044) at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:479) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:411) at hudson.model.Run.run(Run.java:1244) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:304) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:122) Caused by: java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at com.sun.net.ssl.internal.ssl.InputRecord.readFully(InputRecord.java:293) at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:331) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:789) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:746) at com.sun.net.ssl.internal.ssl.AppInputStream.read(AppInputStream.java:75) at java.io.BufferedInputStream.fill(BufferedInputStream.java:218) at java.io.BufferedInputStream.read(BufferedInputStream.java:237) at org.tmatesoft.svn.core.internal.io.dav.http.HTTPParser.readPlainLine(HTTPParser.java:69) at org.tmatesoft.svn.core.internal.io.dav.http.HTTPParser.readLine(HTTPParser.java:51) at org.tmatesoft.svn.core.internal.io.dav.http.HTTPParser.parseStatus(HTTPParser.java:39) at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.readHeader(HTTPConnection.java:195) at org.tmatesoft.svn.core.internal.io.dav.http.HTTPRequest.dispatch(HTTPRequest.java:175) at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:345) ... 22 more |
From: <hu...@op...> - 2010-10-02 13:06:45
|
See <https://hudson.openmindonline.it/job/openutils-testing4dwr-junit/18/> |
From: <hu...@op...> - 2010-10-02 13:06:42
|
See <https://hudson.openmindonline.it/job/openutils-testing/25/> |
From: <hu...@op...> - 2010-10-02 12:58:09
|
See <https://hudson.openmindonline.it/job/openutils-mgnlcriteria/120/> |
From: <hu...@op...> - 2010-10-02 12:52:44
|
See <https://hudson.openmindonline.it/job/openutils-elfunctions/changes> |
From: <hu...@op...> - 2010-10-02 12:52:44
|
See <https://hudson.openmindonline.it/job/openutils-elfunctions/net.sourceforge.openutils$openutils-elfunctions/changes> |
From: <hu...@op...> - 2010-10-02 12:52:05
|
See <https://hudson.openmindonline.it/job/openutils-bshd5/28/> |
From: <hu...@op...> - 2010-10-02 12:49:58
|
See <https://hudson.openmindonline.it/job/openutils-testing4dwr-junit/17/> ------------------------------------------ Started by an SCM change Updating https://openutils.svn.sourceforge.net/svnroot/openutils/trunk/openutils-testing4dwr-junit ERROR: Failed to update https://openutils.svn.sourceforge.net/svnroot/openutils/trunk/openutils-testing4dwr-junit org.tmatesoft.svn.core.SVNException: svn: timed out waiting for server svn: PROPFIND request failed on '/svnroot/openutils/trunk/openutils-testing4dwr-junit' at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:64) at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:51) at org.tmatesoft.svn.core.internal.io.dav.DAVUtil.findStartingProperties(DAVUtil.java:126) at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.fetchRepositoryUUID(DAVConnection.java:116) at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.getRepositoryUUID(DAVRepository.java:148) at org.tmatesoft.svn.core.wc.SVNBasicClient.createRepository(SVNBasicClient.java:342) at org.tmatesoft.svn.core.wc.SVNBasicClient.createRepository(SVNBasicClient.java:330) at org.tmatesoft.svn.core.wc.SVNUpdateClient.update(SVNUpdateClient.java:535) at org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:401) at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:699) at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:660) at hudson.FilePath.act(FilePath.java:747) at hudson.FilePath.act(FilePath.java:729) at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:653) at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:601) at hudson.model.AbstractProject.checkout(AbstractProject.java:1044) at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:479) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:411) at hudson.model.Run.run(Run.java:1244) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:304) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:122) Caused by: java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at com.sun.net.ssl.internal.ssl.InputRecord.readFully(InputRecord.java:293) at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:331) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:789) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1096) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:623) at com.sun.net.ssl.internal.ssl.AppOutputStream.write(AppOutputStream.java:59) at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65) at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123) at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.sendData(HTTPConnection.java:226) at org.tmatesoft.svn.core.internal.io.dav.http.HTTPRequest.dispatch(HTTPRequest.java:166) at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:345) at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:273) at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:261) at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.doPropfind(DAVConnection.java:126) at org.tmatesoft.svn.core.internal.io.dav.DAVUtil.getProperties(DAVUtil.java:63) at org.tmatesoft.svn.core.internal.io.dav.DAVUtil.getResourceProperties(DAVUtil.java:69) at org.tmatesoft.svn.core.internal.io.dav.DAVUtil.getStartingProperties(DAVUtil.java:93) at org.tmatesoft.svn.core.internal.io.dav.DAVUtil.findStartingProperties(DAVUtil.java:115) ... 19 more |
From: <hu...@op...> - 2010-10-02 12:01:47
|
See <https://hudson.openmindonline.it/job/openutils-testing/24/> ------------------------------------------ Started by an SCM change Updating https://openutils.svn.sourceforge.net/svnroot/openutils/trunk/openutils-testing ERROR: Failed to update https://openutils.svn.sourceforge.net/svnroot/openutils/trunk/openutils-testing org.tmatesoft.svn.core.SVNException: svn: timed out waiting for server svn: PROPFIND request failed on '/svnroot/openutils/trunk/openutils-testing' at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:64) at org.tmatesoft.svn.core.internal.wc.SVNErrorManager.error(SVNErrorManager.java:51) at org.tmatesoft.svn.core.internal.io.dav.DAVUtil.findStartingProperties(DAVUtil.java:126) at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.fetchRepositoryUUID(DAVConnection.java:116) at org.tmatesoft.svn.core.internal.io.dav.DAVRepository.getRepositoryUUID(DAVRepository.java:148) at org.tmatesoft.svn.core.wc.SVNBasicClient.createRepository(SVNBasicClient.java:342) at org.tmatesoft.svn.core.wc.SVNBasicClient.createRepository(SVNBasicClient.java:330) at org.tmatesoft.svn.core.wc.SVNUpdateClient.update(SVNUpdateClient.java:535) at org.tmatesoft.svn.core.wc.SVNUpdateClient.doUpdate(SVNUpdateClient.java:401) at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:699) at hudson.scm.SubversionSCM$CheckOutTask.invoke(SubversionSCM.java:660) at hudson.FilePath.act(FilePath.java:747) at hudson.FilePath.act(FilePath.java:729) at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:653) at hudson.scm.SubversionSCM.checkout(SubversionSCM.java:601) at hudson.model.AbstractProject.checkout(AbstractProject.java:1044) at hudson.model.AbstractBuild$AbstractRunner.checkout(AbstractBuild.java:479) at hudson.model.AbstractBuild$AbstractRunner.run(AbstractBuild.java:411) at hudson.model.Run.run(Run.java:1244) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:304) at hudson.model.ResourceController.execute(ResourceController.java:88) at hudson.model.Executor.run(Executor.java:122) Caused by: java.net.SocketTimeoutException: Read timed out at java.net.SocketInputStream.socketRead0(Native Method) at java.net.SocketInputStream.read(SocketInputStream.java:129) at com.sun.net.ssl.internal.ssl.InputRecord.readFully(InputRecord.java:293) at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:331) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:789) at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:746) at com.sun.net.ssl.internal.ssl.AppInputStream.read(AppInputStream.java:75) at java.io.BufferedInputStream.fill(BufferedInputStream.java:218) at java.io.BufferedInputStream.read(BufferedInputStream.java:237) at org.tmatesoft.svn.core.internal.io.dav.http.HTTPParser.readPlainLine(HTTPParser.java:69) at org.tmatesoft.svn.core.internal.io.dav.http.HTTPParser.readLine(HTTPParser.java:51) at org.tmatesoft.svn.core.internal.io.dav.http.HTTPParser.parseStatus(HTTPParser.java:39) at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.readHeader(HTTPConnection.java:195) at org.tmatesoft.svn.core.internal.io.dav.http.HTTPRequest.dispatch(HTTPRequest.java:175) at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:345) at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:273) at org.tmatesoft.svn.core.internal.io.dav.http.HTTPConnection.request(HTTPConnection.java:261) at org.tmatesoft.svn.core.internal.io.dav.DAVConnection.doPropfind(DAVConnection.java:126) at org.tmatesoft.svn.core.internal.io.dav.DAVUtil.getProperties(DAVUtil.java:63) at org.tmatesoft.svn.core.internal.io.dav.DAVUtil.getResourceProperties(DAVUtil.java:69) at org.tmatesoft.svn.core.internal.io.dav.DAVUtil.getStartingProperties(DAVUtil.java:93) at org.tmatesoft.svn.core.internal.io.dav.DAVUtil.findStartingProperties(DAVUtil.java:115) ... 19 more |