Open gkwan-ibm opened 4 years ago
Currently, if using arquillian, users have to run as following:
mvn clean package
mvn liberty:create liberty:install-feature liberty:deploy
mvn liberty:configure-arquillian
mvn failsafe:integration-test
Currently (3.2.2), if using dev mode by following the instruction in the description, tests will fail as
[ERROR] it.io.openliberty.guides.inventory.InventoryArquillianIT Time elapsed: 0 s <<< ERROR!
java.lang.RuntimeException: Arquillian initialization has already been attempted, but failed. See previous exceptions for cause
Caused by: org.jboss.arquillian.container.spi.client.container.LifecycleException: Could not start container
Caused by: org.jboss.arquillian.container.spi.client.container.LifecycleException: Connecting to an already running server is not allowed
Suggest to have a better design/experience so that even no need to do mvn liberty:configure-arquillian
Summary of current situation based on the above: Currently dev mode does not work with Arquillian tests - Arquillian cannot start its own server while dev mode is running, and it cannot connect to dev mode's Liberty server (perhaps unless some manual steps are performed).
This issue is to support a scenario where user is developing Open Liberty and/or Arquillian test cases, and wants to run their Arquillian tests on dev mode's Liberty server.
Document that dev mode does not currently work with Arquillian tests.
Arquillian requires to start its server but dev mode start one. Suggest to have
<allowConnectingToRunningServer>true</allowConnectingToRunningServer>
property. It allows Arquillian to connect the running server started by dev mode.See Option 2 in https://github.com/OpenLiberty/guide-arquillian-managed/pull/68:
<allowConnectingToRunningServer>true</allowConnectingToRunningServer>
property to the pom.xmlmvn liberty:dev
mvn liberty:configure-arquillian
or https://github.com/OpenLiberty/guide-arquillian-managed/issues/69