During development, I want to be able to run my arquillian tests while my webapp is open. Both use a different instance of WildFly:
I want to be able to do those 2 actions in parallel, but when I do that, I get:
Address localhost:9990 is already in use.
or
org.jboss.arquillian.container.spi.client.container.LifecycleException: The server is already running! Managed containers do not support connecting to running server instances due to the possible harmful effect of connecting to the wrong server. Please stop server before running or change to another type of container.
To disable this check and allow Arquillian to connect to a running server, set allowConnectingToRunningServer to true in the container configuration
To fix this, I 'd like to change arquillian.xml so the tests are using different ports. How do I do that?
<container qualifier="jboss" default="true">
<configuration>
<property name="jbossHome">target/wildfly-${version.org.wildfly}</property>
<property name="javaVmArguments">-Xms512m -Xmx1024m -XX:MaxPermSize=512m</property>
</configuration>
</container>
I think you should add to javaVmArguments property: -Djboss.socket.binding.port-offset=1000 and add new property <property name="managementPort">10990</property>
<container qualifier="jboss" default="true">
<configuration>
<property name="jbossHome">target/wildfly-${version.org.wildfly}</property>
<property name="managementPort">10990</property>
<property name="javaVmArguments">-Xms512m -Xmx1024m -XX:MaxPermSize=512m -Djboss.socket.binding.port-offset=1000</property>
</configuration>
</container>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With