Always run OSGi HTTP service on random port in itests (#11523)
It is probably always a good idea to run the OSGi HTTP service on a random available port in itests. So when this is always done it prevents future issues and removes a bit of duplication. Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
parent
207da1cffc
commit
d4510f3fef
|
@ -24,6 +24,10 @@ Import-Package: org.osgi.framework.*;version="[1.8,2)",*
|
||||||
-runfw: org.eclipse.osgi
|
-runfw: org.eclipse.osgi
|
||||||
-runee: JavaSE-11
|
-runee: JavaSE-11
|
||||||
|
|
||||||
|
# An unused random HTTP port is used during tests to prevent resource conflicts
|
||||||
|
# This property is set by the build-helper-maven-plugin in the itests pom.xml
|
||||||
|
-runvm: -Dorg.osgi.service.http.port=${org.osgi.service.http.port}
|
||||||
|
|
||||||
# The integration test itself does not export anything.
|
# The integration test itself does not export anything.
|
||||||
Export-Package:
|
Export-Package:
|
||||||
-exportcontents:
|
-exportcontents:
|
||||||
|
|
|
@ -14,8 +14,6 @@ Fragment-Host: org.openhab.binding.feed
|
||||||
-runblacklist: \
|
-runblacklist: \
|
||||||
bnd.identity;id='org.openhab.core.storage.json'
|
bnd.identity;id='org.openhab.core.storage.json'
|
||||||
|
|
||||||
-runvm: -Dorg.osgi.service.http.port=${org.osgi.service.http.port}
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# done
|
# done
|
||||||
#
|
#
|
||||||
|
|
|
@ -15,8 +15,6 @@
|
||||||
<name>openHAB Add-ons :: Integration Tests :: Feed Binding Tests</name>
|
<name>openHAB Add-ons :: Integration Tests :: Feed Binding Tests</name>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<org.osgi.service.http.port>9090</org.osgi.service.http.port>
|
|
||||||
|
|
||||||
<rome.version>1.15.0</rome.version>
|
<rome.version>1.15.0</rome.version>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
|
@ -44,27 +42,4 @@
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
|
||||||
<artifactId>build-helper-maven-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>reserve-network-port</id>
|
|
||||||
<goals>
|
|
||||||
<goal>reserve-network-port</goal>
|
|
||||||
</goals>
|
|
||||||
<phase>process-resources</phase>
|
|
||||||
<configuration>
|
|
||||||
<portNames>
|
|
||||||
<portName>org.osgi.service.http.port</portName>
|
|
||||||
</portNames>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -12,8 +12,6 @@ Fragment-Host: org.openhab.binding.mielecloud
|
||||||
bnd.identity;id='org.openhab.core.storage.json',\
|
bnd.identity;id='org.openhab.core.storage.json',\
|
||||||
bnd.identity;id='org.openhab.core.storage.mapdb'
|
bnd.identity;id='org.openhab.core.storage.mapdb'
|
||||||
|
|
||||||
-runvm: -Dorg.osgi.service.http.port=${org.osgi.service.http.port}
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# done
|
# done
|
||||||
#
|
#
|
||||||
|
|
|
@ -22,27 +22,4 @@
|
||||||
</dependency>
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
|
||||||
<plugins>
|
|
||||||
<plugin>
|
|
||||||
<groupId>org.codehaus.mojo</groupId>
|
|
||||||
<artifactId>build-helper-maven-plugin</artifactId>
|
|
||||||
<executions>
|
|
||||||
<execution>
|
|
||||||
<id>reserve-network-port</id>
|
|
||||||
<goals>
|
|
||||||
<goal>reserve-network-port</goal>
|
|
||||||
</goals>
|
|
||||||
<phase>process-resources</phase>
|
|
||||||
<configuration>
|
|
||||||
<portNames>
|
|
||||||
<portName>org.osgi.service.http.port</portName>
|
|
||||||
</portNames>
|
|
||||||
</configuration>
|
|
||||||
</execution>
|
|
||||||
</executions>
|
|
||||||
</plugin>
|
|
||||||
</plugins>
|
|
||||||
</build>
|
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|
|
@ -38,6 +38,7 @@
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<m2e.jdt.annotationpath>target/dependency</m2e.jdt.annotationpath>
|
<m2e.jdt.annotationpath>target/dependency</m2e.jdt.annotationpath>
|
||||||
|
<org.osgi.service.http.port>9090</org.osgi.service.http.port>
|
||||||
</properties>
|
</properties>
|
||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
|
@ -179,6 +180,24 @@
|
||||||
</bndruns>
|
</bndruns>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>build-helper-maven-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>reserve-network-port</id>
|
||||||
|
<goals>
|
||||||
|
<goal>reserve-network-port</goal>
|
||||||
|
</goals>
|
||||||
|
<phase>process-resources</phase>
|
||||||
|
<configuration>
|
||||||
|
<portNames>
|
||||||
|
<portName>org.osgi.service.http.port</portName>
|
||||||
|
</portNames>
|
||||||
|
</configuration>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue