At least for some tests, we currently use: https://docs.oracle.com/javase/8/docs/api/java/net/ServerSocket.html#ServerSocket-int-
which lets us use "0 to use a port number that is automatically allocated". But I don't know if that is uniformly in use. I have had success with: http://www.mojohaus.org/build-helper-maven-plugin/reserve-network-port-mojo.html in other projects. --- A. Soroka The University of Virginia Library > On Oct 24, 2016, at 11:46 AM, Claude Warren <[email protected]> wrote: > > Are we using Jetty for testing? Perhaps we could have jetty pick an open > port and then use > http://stackoverflow.com/questions/8884865/how-to-discover-embedded-jetty-port-after-requesting-random-available-port > to find it? > > Otherwise, I have some code somewhere that finds an open port so that > testing servers can properly get started. > > Claude > > On Mon, Oct 24, 2016 at 11:20 AM, Apache Jenkins Server < > [email protected]> wrote: > >> See <https://builds.apache.org/job/Jena_Development_Deploy/1259/changes> >> >> Changes: >> >> [andy] JENA-1243: Clean up POMs for jena-jdbc >> >> [andy] Code, not active, to write "[ :p obj ] ." as [] :p obj . >> >> [andy] Record needed code to enable more general symbolic link handling. >> >> [ajs6f] SORT_ARGS behavior >> >> [ajs6f] Code review >> >> ------------------------------------------ >> [...truncated 2162 lines...] >> [INFO] Uploaded: https://repository.apache.org/content/repositories/ >> snapshots/org/apache/jena/jena-fuseki1/1.4.1-SNAPSHOT/maven-metadata.xml >> (2 KB at 2.2 KB/sec) >> [JENKINS] Archiving disabled >> [INFO] >> [INFO] ------------------------------------------------------------ >> ------------ >> [INFO] Building Apache Jena - Fuseki - A SPARQL 1.1 Server 2.4.1-SNAPSHOT >> [INFO] ------------------------------------------------------------ >> ------------ >> [INFO] >> [INFO] --- maven-clean-plugin:3.0.0:clean (default-clean) @ jena-fuseki --- >> [INFO] Deleting <https://builds.apache.org/job/Jena_Development_Deploy/ >> ws/jena-fuseki2/target> >> [INFO] >> [INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce) @ jena-fuseki --- >> [INFO] >> [INFO] --- apache-rat-plugin:0.11:check (rat-checks) @ jena-fuseki --- >> [INFO] 56 implicit excludes (use -debug for more details). >> [INFO] Exclude: **/.project >> [INFO] Exclude: **/.settings/** >> [INFO] Exclude: **/.classpath >> [INFO] Exclude: **/META-INF/services/* >> [INFO] Exclude: **/src-examples/data/* >> [INFO] Exclude: **/dist/ABOUT >> [INFO] Exclude: **/SEE_FUSEKI2 >> [INFO] Exclude: **/src/main/webapp/css/* >> [INFO] Exclude: **/src/main/webapp/fonts/* >> [INFO] Exclude: **/src/main/webapp/js/**/* >> [INFO] Exclude: **/vocabularies/* >> [INFO] Exclude: **/Vocabularies/* >> [INFO] Exclude: **/src/main/**/*.html >> [INFO] Exclude: **/src/**/package-info.java >> [INFO] Exclude: **/DEPENDENCIES >> [INFO] Exclude: **/*.txt >> [INFO] Exclude: **/*.md >> [INFO] Exclude: **/META-INF/services/* >> [INFO] Exclude: **/src/test/resources/**/* >> [INFO] Exclude: **/testing/**/* >> [INFO] Exclude: **/log4j.properties >> [INFO] Exclude: **/log4j-testing.properties >> [INFO] Exclude: **/derby.log >> [INFO] Exclude: **/DB/**/* >> [INFO] Exclude: **/tdb*.cfg >> [INFO] Exclude: **/run/**/* >> [INFO] Exclude: **/*.classpath >> [INFO] Exclude: **/target/**/* >> [INFO] Exclude: **/dependency-reduced-pom.xml >> [INFO] 11 resources included (use -debug for more details) >> [INFO] Rat check: Summary of files. Unapproved: 0 unknown: 0 generated: 0 >> approved: 8 licence. >> [INFO] >> [INFO] --- maven-remote-resources-plugin:1.5:process >> (process-resource-bundles) @ jena-fuseki --- >> [INFO] >> [INFO] --- maven-site-plugin:3.5.1:attach-descriptor (attach-descriptor) >> @ jena-fuseki --- >> [INFO] >> [INFO] --- maven-javadoc-plugin:2.10.3:jar (attach-javadocs) @ >> jena-fuseki --- >> [INFO] Not executing Javadoc as the project is not a Java >> classpath-capable package >> [INFO] >> [INFO] --- maven-install-plugin:2.5.2:install (default-install) @ >> jena-fuseki --- >> [INFO] Installing <https://builds.apache.org/job/Jena_Development_Deploy/ >> ws/jena-fuseki2/pom.xml> to /home/jenkins/jenkins-slave/ >> maven-repositories/0/org/apache/jena/jena-fuseki/2.4.1- >> SNAPSHOT/jena-fuseki-2.4.1-SNAPSHOT.pom >> [INFO] >> [INFO] --- maven-deploy-plugin:2.8.2:deploy (default-deploy) @ >> jena-fuseki --- >> [INFO] Downloading: https://repository.apache.org/content/repositories/ >> snapshots/org/apache/jena/jena-fuseki/2.4.1-SNAPSHOT/maven-metadata.xml >> [INFO] Downloaded: https://repository.apache.org/content/repositories/ >> snapshots/org/apache/jena/jena-fuseki/2.4.1-SNAPSHOT/maven-metadata.xml >> (605 B at 1.0 KB/sec) >> [INFO] Uploading: https://repository.apache.org/content/repositories/ >> snapshots/org/apache/jena/jena-fuseki/2.4.1-SNAPSHOT/ >> jena-fuseki-2.4.1-20161024.101734-87.pom >> [INFO] Uploaded: https://repository.apache.org/content/repositories/ >> snapshots/org/apache/jena/jena-fuseki/2.4.1-SNAPSHOT/ >> jena-fuseki-2.4.1-20161024.101734-87.pom (3 KB at 3.2 KB/sec) >> [INFO] Downloading: https://repository.apache.org/content/repositories/ >> snapshots/org/apache/jena/jena-fuseki/maven-metadata.xml >> [INFO] Downloaded: https://repository.apache.org/content/repositories/ >> snapshots/org/apache/jena/jena-fuseki/maven-metadata.xml (386 B at 0.6 >> KB/sec) >> [INFO] Uploading: https://repository.apache.org/content/repositories/ >> snapshots/org/apache/jena/jena-fuseki/2.4.1-SNAPSHOT/maven-metadata.xml >> [INFO] Uploaded: https://repository.apache.org/content/repositories/ >> snapshots/org/apache/jena/jena-fuseki/2.4.1-SNAPSHOT/maven-metadata.xml >> (605 B at 0.7 KB/sec) >> [INFO] Uploading: https://repository.apache.org/content/repositories/ >> snapshots/org/apache/jena/jena-fuseki/maven-metadata.xml >> [INFO] Uploaded: https://repository.apache.org/content/repositories/ >> snapshots/org/apache/jena/jena-fuseki/maven-metadata.xml (386 B at 0.5 >> KB/sec) >> [JENKINS] Archiving disabled >> [INFO] >> [INFO] ------------------------------------------------------------ >> ------------ >> [INFO] Building Apache Jena - Fuseki Server Engine 2.4.1-SNAPSHOT >> [INFO] ------------------------------------------------------------ >> ------------ >> [INFO] >> [INFO] --- maven-clean-plugin:3.0.0:clean (default-clean) @ >> jena-fuseki-core --- >> [INFO] Deleting <https://builds.apache.org/job/Jena_Development_Deploy/ >> ws/jena-fuseki2/jena-fuseki-core/target> >> [INFO] >> [INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce) @ >> jena-fuseki-core --- >> [INFO] >> [INFO] --- apache-rat-plugin:0.11:check (rat-checks) @ jena-fuseki-core --- >> [INFO] 51 implicit excludes (use -debug for more details). >> [INFO] Exclude: **/.project >> [INFO] Exclude: **/.settings/** >> [INFO] Exclude: **/.classpath >> [INFO] Exclude: **/META-INF/services/* >> [INFO] Exclude: **/src-examples/data/* >> [INFO] Exclude: **/dist/ABOUT >> [INFO] Exclude: **/SEE_FUSEKI2 >> [INFO] Exclude: **/src/main/webapp/css/* >> [INFO] Exclude: **/src/main/webapp/fonts/* >> [INFO] Exclude: **/src/main/webapp/js/**/* >> [INFO] Exclude: **/vocabularies/* >> [INFO] Exclude: **/Vocabularies/* >> [INFO] Exclude: **/src/main/**/*.html >> [INFO] Exclude: **/src/**/package-info.java >> [INFO] Exclude: **/DEPENDENCIES >> [INFO] Exclude: **/*.txt >> [INFO] Exclude: **/*.md >> [INFO] Exclude: **/META-INF/services/* >> [INFO] Exclude: **/src/test/resources/**/* >> [INFO] Exclude: **/testing/**/* >> [INFO] Exclude: **/log4j.properties >> [INFO] Exclude: **/log4j-testing.properties >> [INFO] Exclude: **/derby.log >> [INFO] Exclude: **/DB/**/* >> [INFO] Exclude: **/tdb*.cfg >> [INFO] Exclude: **/run/**/* >> [INFO] Exclude: **/*.classpath >> [INFO] Exclude: **/target/**/* >> [INFO] Exclude: **/dependency-reduced-pom.xml >> [INFO] 158 resources included (use -debug for more details) >> [INFO] Rat check: Summary of files. Unapproved: 0 unknown: 0 generated: 0 >> approved: 142 licence. >> [INFO] >> [INFO] --- maven-remote-resources-plugin:1.5:process >> (process-resource-bundles) @ jena-fuseki-core --- >> [INFO] >> [INFO] --- maven-resources-plugin:2.7:resources (default-resources) @ >> jena-fuseki-core --- >> [INFO] Using 'UTF-8' encoding to copy filtered resources. >> [INFO] Copying 8 resources >> [INFO] Copying 1 resource >> [INFO] Copying 3 resources >> [INFO] >> [INFO] --- maven-compiler-plugin:3.5.1:compile (default-compile) @ >> jena-fuseki-core --- >> [INFO] Changes detected - recompiling the module! >> [INFO] Compiling 111 source files to <https://builds.apache.org/ >> job/Jena_Development_Deploy/ws/jena-fuseki2/jena-fuseki- >> core/target/classes> >> [INFO] >> [INFO] --- maven-resources-plugin:2.7:testResources >> (default-testResources) @ jena-fuseki-core --- >> [INFO] Using 'UTF-8' encoding to copy filtered resources. >> [INFO] skip non existing resourceDirectory <https://builds.apache.org/ >> job/Jena_Development_Deploy/ws/jena-fuseki2/jena-fuseki- >> core/src/test/resources> >> [INFO] Copying 3 resources >> [INFO] >> [INFO] --- maven-compiler-plugin:3.5.1:testCompile (default-testCompile) >> @ jena-fuseki-core --- >> [INFO] Changes detected - recompiling the module! >> [INFO] Compiling 19 source files to <https://builds.apache.org/ >> job/Jena_Development_Deploy/ws/jena-fuseki2/jena-fuseki- >> core/target/test-classes> >> [INFO] >> [INFO] --- maven-surefire-plugin:2.19.1:test (default-test) @ >> jena-fuseki-core --- >> >> ------------------------------------------------------- >> T E S T S >> ------------------------------------------------------- >> Running org.apache.jena.fuseki.TS_Fuseki >> [2016-10-24 10:17:58] Server ERROR SPARQLServer (port=57947): Failed >> to start server: Address already in use >> >> Results : >> >> Tests run: 0, Failures: 0, Errors: 0, Skipped: 0 >> >> [JENKINS] Recording test results >> [JENKINS] Archiving disabled >> [JENKINS] Archiving disabled >> [JENKINS] Archiving disabled >> [JENKINS] Archiving disabled >> [JENKINS] Archiving disabled >> [JENKINS] Archiving disabled >> [JENKINS] Archiving disabled >> [JENKINS] Archiving disabled >> [JENKINS] Archiving disabled >> [JENKINS] Archiving disabled >> [JENKINS] Archiving disabled >> [JENKINS] Archiving disabled >> [JENKINS] Archiving disabled >> [JENKINS] Archiving disabled >> [JENKINS] Archiving disabled >> [JENKINS] Archiving disabled >> [JENKINS] Archiving disabled >> [JENKINS] Archiving disabled >> [JENKINS] Archiving disabled >> [JENKINS] Archiving disabled >> [JENKINS] Archiving disabled >> [JENKINS] Archiving disabled >> [JENKINS] Archiving disabled >> [JENKINS] Archiving disabled >> [JENKINS] Archiving disabled >> [JENKINS] Archiving disabled >> [JENKINS] Archiving disabled >> [JENKINS] Archiving disabled >> [JENKINS] Archiving disabled >> [JENKINS] Archiving disabled >> [JENKINS] Archiving disabled >> [JENKINS] Archiving disabled >> [JENKINS] Archiving disabled >> [JENKINS] Archiving disabled >> [JENKINS] Archiving disabled >> [JENKINS] Archiving disabled >> [JENKINS] Archiving disabled >> [JENKINS] Archiving disabled >> [JENKINS] Archiving disabled >> [JENKINS] Archiving disabled[INFO] ------------------------------ >> ------------------------------------------ >> [INFO] Reactor Summary: >> [INFO] >> [INFO] Apache Jena - Parent ............................... SUCCESS [ >> 20.342 s] >> [INFO] Apache Jena - Shadowed external libraries .......... SUCCESS [ >> 20.233 s] >> [INFO] Apache Jena - IRI .................................. SUCCESS [ >> 31.477 s] >> [INFO] Apache Jena - Base Common Environment .............. SUCCESS [01:19 >> min] >> [INFO] Apache Jena - Core ................................. SUCCESS >> [03:19 min] >> [INFO] Apache Jena - ARQ (SPARQL 1.1 Query Engine) ........ SUCCESS [04:46 >> min] >> [INFO] Apache Jena - TDB (Native Triple Store) ............ SUCCESS [04:31 >> min] >> [INFO] Apache Jena - Libraries POM ........................ SUCCESS [ >> 5.200 s] >> [INFO] Apache Jena - Command line tools ................... SUCCESS [01:02 >> min] >> [INFO] Apache Jena - SPARQL Text Search ................... SUCCESS [ >> 59.045 s] >> [INFO] Apache Jena - SPARQL Spatial Search ................ SUCCESS [01:09 >> min] >> [INFO] Apache Jena - Data Tables for RDF and SPARQL ....... SUCCESS [ >> 27.991 s] >> [INFO] Apache Jena - SDB (SQL based triple store) ......... SUCCESS [02:26 >> min] >> [INFO] Apache Jena - Fuseki1 .............................. SUCCESS [01:27 >> min] >> [INFO] Apache Jena - Fuseki - A SPARQL 1.1 Server ......... SUCCESS [ >> 6.414 s] >> [INFO] Apache Jena - Fuseki Server Engine ................. FAILURE [ >> 20.256 s] >> [INFO] Apache Jena - Fuseki Embedded Server ............... SKIPPED >> [INFO] Apache Jena - Fuseki WAR File ...................... SKIPPED >> [INFO] Apache Jena - Fuseki Server Standalone Jar ......... SKIPPED >> [INFO] Apache Jena - Fuseki Binary Distribution ........... SKIPPED >> [INFO] Apache Jena - Security Permissions ................. SKIPPED >> [INFO] Apache Jena - JDBC Parent .......................... SKIPPED >> [INFO] Apache Jena - JDBC Core API ........................ SKIPPED >> [INFO] Apache Jena - JDBC Remote Endpoint Driver .......... SKIPPED >> [INFO] Apache Jena - JDBC In-Memory Driver ................ SKIPPED >> [INFO] Apache Jena - JDBC TDB Driver ...................... SKIPPED >> [INFO] Apache Jena - JDBC Driver Bundle ................... SKIPPED >> [INFO] Apache Jena - Elephas .............................. SKIPPED >> [INFO] Apache Jena - Elephas - Common API ................. SKIPPED >> [INFO] Apache Jena - Elephas - I/O ........................ SKIPPED >> [INFO] Apache Jena - Elephas - Map/Reduce ................. SKIPPED >> [INFO] Apache Jena - Elephas - Statistics Demo App ........ SKIPPED >> [INFO] Apache Jena - Distribution ......................... SKIPPED >> [INFO] Apache Jena - OSGi ................................. SKIPPED >> [INFO] Apache Jena - OSGi bundle .......................... SKIPPED >> [INFO] Apache Jena - OSGi Karaf features .................. SKIPPED >> [INFO] Apache Jena - Extras ............................... SKIPPED >> [INFO] Apache Jena - Extras - Query Builder ............... SKIPPED >> [INFO] Apache Jena ........................................ SKIPPED >> [INFO] ------------------------------------------------------------ >> ------------ >> [INFO] BUILD FAILURE >> [INFO] ------------------------------------------------------------ >> ------------ >> [INFO] Total time: 23:44 min >> [INFO] Finished at: 2016-10-24T10:18:08+00:00 >> >> [INFO] Final Memory: 180M/2773M >> [INFO] ------------------------------------------------------------ >> ------------ >> Waiting for Jenkins to finish collecting data >> [ERROR] Failed to execute goal org.apache.maven.plugins: >> maven-surefire-plugin:2.19.1:test (default-test) on project >> jena-fuseki-core: Execution default-test of goal org.apache.maven.plugins: >> maven-surefire-plugin:2.19.1:test failed: The forked VM terminated >> without properly saying goodbye. VM crash or System.exit called? >> [ERROR] Command was /bin/sh -c cd <https://builds.apache.org/ >> job/Jena_Development_Deploy/ws/jena-fuseki2/jena-fuseki-core> && >> /usr/local/asfpackages/java/jdk1.8.0_102/jre/bin/java -jar < >> https://builds.apache.org/job/Jena_Development_Deploy/ >> ws/jena-fuseki2/jena-fuseki-core/target/surefire/ >> surefirebooter776506334328875565.jar> <https://builds.apache.org/ >> job/Jena_Development_Deploy/ws/jena-fuseki2/jena-fuseki- >> core/target/surefire/surefire3789454448938206879tmp> < >> https://builds.apache.org/job/Jena_Development_Deploy/ >> ws/jena-fuseki2/jena-fuseki-core/target/surefire/surefire_ >> 104992808647433489478tmp> >> [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/ >> PluginExecutionException >> [ERROR] >> [ERROR] After correcting the problems, you can resume the build with the >> command >> [ERROR] mvn <goals> -rf :jena-fuseki-core >> channel stopped >> > > > > -- > I like: Like Like - The likeliest place on the web > <http://like-like.xenei.com> > LinkedIn: http://www.linkedin.com/in/claudewarren
