You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Bertrand Delacretaz (JIRA)" <ji...@apache.org> on 2012/04/30 18:07:49 UTC

[jira] [Commented] (SLING-2460) Apache Sling Sample Integration Tests fails when trying to build sling

    [ https://issues.apache.org/jira/browse/SLING-2460?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13264997#comment-13264997 ] 

Bertrand Delacretaz commented on SLING-2460:
--------------------------------------------

The tests pass on our Jenkins server at https://builds.apache.org/job/sling-trunk-1.6/ and https://builds.apache.org/job/sling-trunk-1.5/

In your case the core problem is the first test saying "server not ready after 60 seconds, giving up", looks like the Sling instance to test didn't start, or too late (which might happen if running on a really slow box).

To troubleshoot this you can try to leave that instance running, as explained in testing/samples/integration-tests/pom.xml

  mvn clean verify -DkeepJarRunning=true -Dhttp.port=8080

And look at http://localhost:8080 and http://localhost:8080/system/console to check if the instance comes up.

You can then try to run the tests against it from a separate console, see pom.xml for how to do that.
                
> Apache Sling Sample Integration Tests fails when trying to build sling
> ----------------------------------------------------------------------
>
>                 Key: SLING-2460
>                 URL: https://issues.apache.org/jira/browse/SLING-2460
>             Project: Sling
>          Issue Type: Bug
>          Components: Launchpad, Testing
>            Reporter: Rajesh P
>
> When trying to checkout sling from svn trunk, the build fails, saying "Apache Sling Sample Integration Tests ............. FAILURE [1:38.885s]"
> I tried it 3-4 times in different boxes but getting same build failure error every time.
> This is the build log.
> Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-booter/2.5/surefire-booter-2.5.jar (314 KB at 98.9 KB/sec)
> Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-utils/1.5.9/plexus-utils-1.5.9.jar (263 KB at 76.6 KB/sec)
> Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-api/2.5/surefire-api-2.5.jar (558 KB at 128.7 KB/sec)
> Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-junit4/2.5/surefire-junit4-2.5.pom
> Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-junit4/2.5/surefire-junit4-2.5.pom (2 KB at 3.0 KB/sec)
> Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-providers/2.5/surefire-providers-2.5.pom
> Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-providers/2.5/surefire-providers-2.5.pom (2 KB at 2.6 KB/sec)
> Downloading: http://repo.maven.apache.org/maven2/junit/junit/4.0/junit-4.0.pom
> Downloaded: http://repo.maven.apache.org/maven2/junit/junit/4.0/junit-4.0.pom (210 B at 0.3 KB/sec)
> Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-junit4/2.5/surefire-junit4-2.5.jar
> Downloading: http://repo.maven.apache.org/maven2/junit/junit/4.0/junit-4.0.jar
> Downloaded: http://repo.maven.apache.org/maven2/junit/junit/4.0/junit-4.0.jar (104 KB at 127.5 KB/sec)
> Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/surefire/surefire-junit4/2.5/surefire-junit4-2.5.jar (12 KB at 10.0 KB/sec)
> [INFO] Surefire report directory: /home/rajeshp/Developer@Work/sling/trunk/sling/testing/samples/integration-tests/target/surefire-reports
> -------------------------------------------------------
>  T E S T S
> -------------------------------------------------------
> There are no tests to run.
> Results :
> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
> [INFO] 
> [INFO] --- animal-sniffer-maven-plugin:1.7:check (default) @ org.apache.sling.testing.samples.integrationtests ---
> [INFO] Checking unresolved references to org.codehaus.mojo.signature:java15:1.0
> [INFO] 
> [INFO] --- maven-jar-plugin:2.3.1:jar (default-jar) @ org.apache.sling.testing.samples.integrationtests ---
> [INFO] Building jar: /home/rajeshp/Developer@Work/sling/trunk/sling/testing/samples/integration-tests/target/org.apache.sling.testing.samples.integrationtests-1.0.7-SNAPSHOT.jar
> [INFO] 
> [INFO] >>> maven-source-plugin:2.1.2:jar (attach-sources) @ org.apache.sling.testing.samples.integrationtests >>>
> [INFO] 
> [INFO] --- maven-enforcer-plugin:1.0:enforce (enforce-java) @ org.apache.sling.testing.samples.integrationtests ---
> [INFO] 
> [INFO] <<< maven-source-plugin:2.1.2:jar (attach-sources) @ org.apache.sling.testing.samples.integrationtests <<<
> [INFO] 
> [INFO] --- maven-source-plugin:2.1.2:jar (attach-sources) @ org.apache.sling.testing.samples.integrationtests ---
> [INFO] META-INF already added, skipping
> [INFO] META-INF/LICENSE already added, skipping
> [INFO] META-INF/DEPENDENCIES already added, skipping
> [INFO] META-INF/NOTICE already added, skipping
> [INFO] Building jar: /home/rajeshp/Developer@Work/sling/trunk/sling/testing/samples/integration-tests/target/org.apache.sling.testing.samples.integrationtests-1.0.7-SNAPSHOT-sources.jar
> [INFO] META-INF already added, skipping
> [INFO] META-INF/LICENSE already added, skipping
> [INFO] META-INF/DEPENDENCIES already added, skipping
> [INFO] META-INF/NOTICE already added, skipping
> [INFO] 
> [INFO] --- maven-failsafe-plugin:2.7.2:integration-test (integration-test) @ org.apache.sling.testing.samples.integrationtests ---
> [INFO] Failsafe report directory: /home/rajeshp/Developer@Work/sling/trunk/sling/testing/samples/integration-tests/target/failsafe-reports
> -------------------------------------------------------
>  T E S T S
> -------------------------------------------------------
> Running org.apache.sling.testing.samples.integrationtests.serverside.ServerSideSampleTest
> 37 [main] INFO org.apache.sling.testing.tools.sling.TimeoutsProvider - Timeout factor set to 1.0 from system property sling.testing.timeout.multiplier
> 243 [main] INFO org.apache.sling.testing.samples.integrationtests.serverside.ServerSideSampleTest - Server base URL=http://localhost:44500
> 250 [main] INFO org.apache.sling.testing.tools.jarexec.JarExecutor - Executable jar options: -p 44500
> 250 [main] INFO org.apache.sling.testing.tools.jarexec.JarExecutor - Executing java -Xmx512m -jar /home/rajeshp/Developer@Work/sling/trunk/sling/testing/samples/integration-tests/target/dependency/org.apache.sling.launchpad-6-standalone.jar -p 44500
> 252 [main] INFO org.apache.sling.testing.samples.integrationtests.serverside.ServerSideSampleTest - Will wait up to 60 seconds for server to become ready
> 286 [main] INFO org.apache.sling.testing.samples.integrationtests.serverside.ServerSideSampleTest - Checking that GET requests return expected content (timeout=60 seconds): [/:script src="system/sling.js", /.explorer.html:href="/libs/sling/explorer/css/explorer.css", /sling-test/sling/sling-test.html:Sling client library tests]
> 30.04.2012 04:43:18.747 *INFO* [main] Setting sling.home=sling (default)
> 30.04.2012 04:43:18.749 *INFO* [main] Starting Sling in sling (/home/rajeshp/Developer@Work/sling/trunk/sling/testing/samples/integration-tests/sling)
> 30.04.2012 04:43:18.773 *INFO* [main] Checking launcher JAR in folder sling
> 30.04.2012 04:43:18.814 *INFO* [main] Installing new launcher: jar:file:/home/rajeshp/Developer@Work/sling/trunk/sling/testing/samples/integration-tests/target/dependency/org.apache.sling.launchpad-6-standalone.jar!/resources/org.apache.sling.launchpad.base.jar, 2.3.0 (org.apache.sling.launchpad.base.jar.1335741198814)
> 30.04.2012 04:43:18.816 *INFO* [main] Loading launcher class org.apache.sling.launchpad.base.app.MainDelegate from org.apache.sling.launchpad.base.jar.1335741198814
> 30.04.2012 04:43:18.830 *INFO* [main] Starting launcher ...
> 30.04.2012 04:43:18.832 *INFO* [main] HTTP server port: 44500
> 30.04.2012 04:43:22.877 *INFO* [main] Startup completed
> 60944 [main] INFO org.apache.sling.testing.samples.integrationtests.serverside.ServerSideSampleTest - Server not ready after 60 seconds, giving up
> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 61.17 sec <<< FAILURE!
> Running org.apache.sling.testing.samples.integrationtests.serverside.FailingTestsTest
> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.253 sec <<< FAILURE!
> Running org.apache.sling.testing.samples.integrationtests.serverside.SingleServerSideMethodTest
> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.001 sec <<< FAILURE!
> Running org.apache.sling.testing.samples.integrationtests.serverside.JSONResponseTest
> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec <<< FAILURE!
> Running org.apache.sling.testing.samples.integrationtests.serverside.DontCareForTestsCountTest
> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec <<< FAILURE!
> Running org.apache.sling.testing.samples.integrationtests.serverside.scriptable.ScriptableTestsTest
> Tests run: 2, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 0.016 sec <<< FAILURE!
> Running org.apache.sling.testing.samples.integrationtests.serverside.sling.SlingServerSideTest
> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.066 sec <<< FAILURE!
> Running org.apache.sling.testing.samples.integrationtests.serverside.sling.SlingServerSideSingleMethodTest
> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.009 sec <<< FAILURE!
> Running org.apache.sling.testing.samples.integrationtests.http.OsgiConsoleTest
> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.002 sec <<< FAILURE!
> Results :
> Failed tests: 
>   initializationError(org.apache.sling.testing.samples.integrationtests.serverside.ServerSideSampleTest): Server not ready after 60 seconds, giving up
>   testFailures(org.apache.sling.testing.samples.integrationtests.serverside.FailingTestsTest): Server is not ready according to previous tests
>   initializationError(org.apache.sling.testing.samples.integrationtests.serverside.SingleServerSideMethodTest): Server is not ready according to previous tests
>   testWithRetries(org.apache.sling.testing.samples.integrationtests.serverside.JSONResponseTest): Server is not ready according to previous tests
>   initializationError(org.apache.sling.testing.samples.integrationtests.serverside.DontCareForTestsCountTest): Server is not ready according to previous tests
>   testScriptableTest[0](org.apache.sling.testing.samples.integrationtests.serverside.scriptable.ScriptableTestsTest): Server is not ready according to previous tests
>   testScriptableTest[1](org.apache.sling.testing.samples.integrationtests.serverside.scriptable.ScriptableTestsTest): Server is not ready according to previous tests
>   initializationError(org.apache.sling.testing.samples.integrationtests.serverside.sling.SlingServerSideTest): Server is not ready according to previous tests
>   initializationError(org.apache.sling.testing.samples.integrationtests.serverside.sling.SlingServerSideSingleMethodTest): Server is not ready according to previous tests
>   testSomeConsolePaths(org.apache.sling.testing.samples.integrationtests.http.OsgiConsoleTest): Server is not ready according to previous tests
> Tests run: 10, Failures: 10, Errors: 0, Skipped: 0
> [WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
> [INFO] 
> [INFO] --- ianal-maven-plugin:1.0-alpha-1:verify-legal-files (default) @ org.apache.sling.testing.samples.integrationtests ---
> [INFO] Checking legal files in: org.apache.sling.testing.samples.integrationtests-1.0.7-SNAPSHOT.jar
> [INFO] Checking legal files in: org.apache.sling.testing.samples.integrationtests-1.0.7-SNAPSHOT-sources.jar
> [INFO] 
> [INFO] --- maven-failsafe-plugin:2.7.2:verify (verify) @ org.apache.sling.testing.samples.integrationtests ---
> [INFO] Failsafe report directory: /home/rajeshp/Developer@Work/sling/trunk/sling/testing/samples/integration-tests/target/failsafe-reports
> [WARNING] File encoding has not been set, using platform encoding UTF-8, i.e. build is platform dependent!
> [INFO] ------------------------------------------------------------------------
> [INFO] Reactor Summary:
> [INFO] 
> [INFO] Apache Sling JAR Resource Bundle .................. SUCCESS [2.474s]
> [INFO] Apache Sling (Parent) ............................. SUCCESS [2.325s]
> [INFO] Sling Adapter Annotations ......................... SUCCESS [4.010s]
> [INFO] Apache Sling Maven Plugin to create Jackrabbit OCM descriptors  SUCCESS [3.544s]
> [INFO] Apache Sling Maven Plugin for Compiling JSP Sources into Bundles  SUCCESS [3.546s]
> [INFO] Apache Sling Maven Plugin for Supporting Bundle Development  SUCCESS [3.709s]
> [INFO] Apache Sling Launchpad Base ....................... SUCCESS [9.353s]
> [INFO] Apache Sling Launchpad Maven Plugin ............... SUCCESS [11.928s]
> [INFO] Sling Launchpad Standalone Archetype .............. SUCCESS [2.505s]
> [INFO] Sling Launchpad Webapp Archetype .................. SUCCESS [1.302s]
> [INFO] Sling Initial Content Archetype ................... SUCCESS [1.133s]
> [INFO] Sling Servlet Archetype ........................... SUCCESS [29.801s]
> [INFO] Sling Bundle Archetype ............................ SUCCESS [1.502s]
> [INFO] Sling JCRInstall Bundle Archetype ................. SUCCESS [1.834s]
> [INFO] Apache Sling API .................................. SUCCESS [11.434s]
> [INFO] Apache Sling System Bundle Extension: Java Transaction API  SUCCESS [1.504s]
> [INFO] Apache Sling System Bundle Extension: XML APIs .... SUCCESS [1.576s]
> [INFO] Apache Sling System Bundle Extension: Activation API  SUCCESS [1.617s]
> [INFO] Apache Sling System Bundle Extension: WS APIs ..... SUCCESS [1.357s]
> [INFO] Apache Sling Dynamic Class Loader Support ......... SUCCESS [30.481s]
> [INFO] Apache Sling JSON Library ......................... SUCCESS [6.038s]
> [INFO] Apache Sling SLF4J Implementation ................. SUCCESS [8.687s]
> [INFO] Apache Sling OSGi LogService Implementation ....... SUCCESS [2.628s]
> [INFO] Apache Sling MIME type mapping support ............ SUCCESS [8.909s]
> [INFO] Apache Sling Commons OSGi support ................. SUCCESS [3.241s]
> [INFO] Apache Sling Scheduler Support .................... SUCCESS [3.905s]
> [INFO] Apache Sling Testing Utilities .................... SUCCESS [1:28.015s]
> [INFO] Apache Sling Thread Support ....................... SUCCESS [3.366s]
> [INFO] Apache Sling Authentication Service ............... SUCCESS [5.710s]
> [INFO] Apache Sling OpenID Authentication ................ SUCCESS [7.147s]
> [INFO] Apache Sling Form Based Authentication Handler .... SUCCESS [5.834s]
> [INFO] Apache Sling Authentication Selector .............. SUCCESS [5.045s]
> [INFO] Apache Sling Engine Implementation ................ SUCCESS [28.909s]
> [INFO] Apache Sling Repository API Bundle ................ SUCCESS [2.733s]
> [INFO] Apache Sling JCR Base Bundle ...................... SUCCESS [4.081s]
> [INFO] Apache Sling JCR ClassLoader ...................... SUCCESS [3.886s]
> [INFO] Apache Sling Initial Content Loader ............... SUCCESS [7.085s]
> [INFO] Apache Sling Jackrabbit Embedded Repository ....... SUCCESS [9.177s]
> [INFO] Apache Sling Jackrabbit UserManager Support ....... SUCCESS [9.146s]
> [INFO] Apache Sling Jackrabbit JSR-283 Access Control Manager Support  SUCCESS [6.024s]
> [INFO] Apache Sling Object Content Mapping ............... SUCCESS [9.587s]
> [INFO] Apache Sling JCR Resource Resolver ................ SUCCESS [3:00.783s]
> [INFO] Apache Sling Simple WebDAV Access to repositories . SUCCESS [16.088s]
> [INFO] Apache Sling DavEx Access to repositories ......... SUCCESS [5.635s]
> [INFO] Apache Sling JCR WebConsole Bundle ................ SUCCESS [3.782s]
> [INFO] Apache Sling Servlet Resolver ..................... SUCCESS [6.983s]
> [INFO] Apache Sling Default GET Servlets ................. SUCCESS [7.307s]
> [INFO] Apache Sling Default POST Servlets ................ SUCCESS [9.308s]
> [INFO] Apache Sling Compat Servlets ...................... SUCCESS [2.979s]
> [INFO] Apache Sling Scripting Implementation API ......... SUCCESS [6.485s]
> [INFO] Apache Sling Scripting Core implementation ........ SUCCESS [6.002s]
> [INFO] Apache Sling Scripting JavaScript Support ......... SUCCESS [1:00.303s]
> [INFO] Apache Sling Scripting JSP Support ................ SUCCESS [10.580s]
> [INFO] Apache Sling JSP Tag Library ...................... SUCCESS [2.951s]
> [INFO] Apache Sling Adapter Manager Implementation ....... SUCCESS [4.613s]
> [INFO] Apache Sling Bundle Resource Provider ............. SUCCESS [2.397s]
> [INFO] Apache Sling Event Support ........................ SUCCESS [15:41.799s]
> [INFO] Apache Sling Filesystem Resource Provider ......... SUCCESS [32.110s]
> [INFO] Apache Sling Settings ............................. SUCCESS [7.967s]
> [INFO] Apache Sling Thread Dumper ........................ SUCCESS [4.852s]
> [INFO] Apache Sling Web Console Branding ................. SUCCESS [2.534s]
> [INFO] Apache Sling Web Console Security Provider ........ SUCCESS [4.516s]
> [INFO] Apache Sling Groovy Extensions .................... SUCCESS [7.887s]
> [INFO] Apache Sling Explorer ............................. SUCCESS [3.030s]
> [INFO] Apache Sling Test Tools ........................... SUCCESS [1:07.452s]
> [INFO] Apache Sling JUnit Core ........................... SUCCESS [51.405s]
> [INFO] Apache Sling JUnit Scriptable Tests Provider ...... SUCCESS [12.696s]
> [INFO] Apache Sling JUnit Remote Tests Runners ........... SUCCESS [12.087s]
> [INFO] Apache Sling Installer ............................ SUCCESS [15.515s]
> [INFO] Apache Sling File Installer ....................... SUCCESS [4.121s]
> [INFO] Apache Sling JCR Installer ........................ SUCCESS [4:54.655s]
> [INFO] Apache Sling Installer Configuration Admin Support  SUCCESS [6.391s]
> [INFO] Apache Sling Deployment Package Installer ......... SUCCESS [3.002s]
> [INFO] Apache Sling Installer Integration Tests .......... SUCCESS [1:58.702s]
> [INFO] Apache Sling Launchpad API ........................ SUCCESS [2.764s]
> [INFO] Apache Sling Launchpad Installer .................. SUCCESS [2.381s]
> [INFO] Apache Sling Launchpad Content .................... SUCCESS [1.844s]
> [INFO] Apache Sling Launchpad Application Builder ........ SUCCESS [3:56.896s]
> [INFO] Apache Sling Sample Server-Side Tests ............. SUCCESS [7.252s]
> [INFO] Apache Sling Failing Server-Side Tests ............ SUCCESS [2.316s]
> [INFO] Apache Sling Sample Integration Tests ............. FAILURE [1:38.885s]
> [INFO] Apache Sling Launchpad Testing Services ........... SKIPPED
> [INFO] Apache Sling Launchpad Testing Services WAR ....... SKIPPED
> [INFO] Apache Sling Launchpad Test Bundles ............... SKIPPED
> [INFO] Apache Sling Integration Tests .................... SKIPPED
> [INFO] Apache Sling Launchpad Testing .................... SKIPPED
> [INFO] Apache Sling (Builder) ............................ SKIPPED
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 43:54.870s
> [INFO] Finished at: Mon Apr 30 04:44:20 IST 2012
> [INFO] Final Memory: 208M/463M
> [INFO] ------------------------------------------------------------------------
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-failsafe-plugin:2.7.2:verify (verify) on project org.apache.sling.testing.samples.integrationtests: There are test failures.
> [ERROR] 
> [ERROR] Please refer to /home/rajeshp/Developer@Work/sling/trunk/sling/testing/samples/integration-tests/target/failsafe-reports for the individual test results.
> [ERROR] -> [Help 1]
> [ERROR] 
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR] 
> [ERROR] For more information about the errors and possible solutions, please read the following articles:
> [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
> [ERROR] 
> [ERROR] After correcting the problems, you can resume the build with the command
> [ERROR]   mvn <goals> -rf :org.apache.sling.testing.samples.integrationtests

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira