-
Task
-
Resolution: Done
-
Major
-
7.0.0.Beta2
-
None
-
None
Combining PerSuite and PerClass/PerMethod PAX EXAM reactors results in two containers running at the same time which could trigger resource conflicts similar to the one below:
karaf@root> Exception in thread "JMX Connector Thread [service:jmx:rmi://0.0.0.0:44444/jndi/rmi://0.0.0.0:1099/karaf-root]" java.lang.RuntimeException: Port already in use: 44444; You may have started two containers. If you need to start a second container or the default ports are already in use update the config file etc/org.apache.karaf.management.cfg and change the Registry Port and Server Port to unused ports at org.apache.karaf.management.ConnectorServerFactory$1.run(ConnectorServerFactory.java:244)
To avoid this issue split the OSGi tests into two groups with separate Surefire executions - one with the container reused and one with the container started for each class/method.
Related to an earlier workaround: ISPN-4487