This is an automated email from the ASF dual-hosted git repository. rombert pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-karaf-launchpad-oak-tar-integration-tests.git
commit cab8c23fac7c6b25c48600cdcc7dbf63437f1456 Author: Oliver Lietz <[email protected]> AuthorDate: Mon Jul 25 10:59:49 2016 +0000 SLING-3821 Run launchpad integration tests against Sling on Karaf use dynamic HTTP port git-svn-id: https://svn.apache.org/repos/asf/sling/trunk@1753975 13f79535-47bb-0310-9956-ffa450edef68 --- pom.xml | 20 +++++++++++++++++++- .../SlingLaunchpadOakTarConfiguration.java | 2 +- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 5739d9d..4344ff0 100644 --- a/pom.xml +++ b/pom.xml @@ -218,6 +218,7 @@ <artifactId>exam-maven-plugin</artifactId> <configuration> <configClass>org.apache.sling.karaf.tests.configuration.SlingLaunchpadOakTarConfiguration</configClass> + <propagatedProperties>http.port</propagatedProperties> </configuration> <executions> <execution> @@ -253,7 +254,7 @@ </executions> <configuration> <systemPropertyVariables> - <jar.executor.server.port>8888</jar.executor.server.port> + <launchpad.http.server.url>http://localhost:${http.port}</launchpad.http.server.url> <server.ready.path.1>/:script src="/system/sling.js"</server.ready.path.1> <server.ready.path.2>/.explorer.html:href="/libs/sling/explorer/css/explorer.css"</server.ready.path.2> <server.ready.path.3>/sling-test/sling/sling-test.html:Sling client library tests</server.ready.path.3> @@ -287,6 +288,23 @@ </excludes> </configuration> </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>build-helper-maven-plugin</artifactId> + <version>1.11</version> + <executions> + <execution> + <goals> + <goal>reserve-network-port</goal> + </goals> + <configuration> + <portNames> + <portName>http.port</portName> + </portNames> + </configuration> + </execution> + </executions> + </plugin> </plugins> </build> </profile> diff --git a/src/test/java/org/apache/sling/karaf/tests/configuration/SlingLaunchpadOakTarConfiguration.java b/src/test/java/org/apache/sling/karaf/tests/configuration/SlingLaunchpadOakTarConfiguration.java index c86ff01..0ad5ded 100644 --- a/src/test/java/org/apache/sling/karaf/tests/configuration/SlingLaunchpadOakTarConfiguration.java +++ b/src/test/java/org/apache/sling/karaf/tests/configuration/SlingLaunchpadOakTarConfiguration.java @@ -31,7 +31,7 @@ public class SlingLaunchpadOakTarConfiguration extends KarafTestSupport { @Configuration public Option[] configuration() { - final int httpPort = 8888; // TODO findFreePort(); + final int httpPort = Integer.getInteger("http.port"); return OptionUtils.combine(baseConfiguration(), cleanCaches(true), editConfigurationFilePut("etc/org.ops4j.pax.logging.cfg", "log4j.rootLogger", "ERROR, out, sift, osgi:*"), -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
