ingwarsw / arquillian-suite-extension

Arquillian extension that will force single deployment for all tests
Apache License 2.0
67 stars 20 forks source link

Arquillian Tests starting before container is deployed #52

Open eichstaedtk opened 6 years ago

eichstaedtk commented 6 years ago

Hi There, i have an issue with your suite an the maven release plugin. During the perform phase all JPA Integration Test fail because it seems that the test are starting before the container is ready:

[INFO] [INFO] --- maven-failsafe-plugin:2.21.0:integration-test (integration-tests) @ einbandnachweis --- [INFO] [INFO] [INFO] [INFO] ------------------------------------------------------- [INFO] [INFO] T E S T S [INFO] [INFO] ------------------------------------------------------- [INFO] [INFO] Running de.staatsbibliothek.berlin.einbandnachweis.domain.service.BeschreibungEinbandServiceIT [INFO] Aug 01, 2018 8:30:40 AM org.reflections.Reflections scan [INFO] INFORMATION: Reflections took 201 ms to scan 1 urls, producing 6 keys and 68 values [INFO] Aug 01, 2018 8:30:40 AM org.eu.ingwar.tools.arquillian.extension.suite.DeploymentClassFinder getDeploymentClassFromAnnotation [INFO] INFORMATION: arquillian-suite-deployment: Found class annotated with @ArquillianSuiteDeployment: de.staatsbibliothek.berlin.einbandnachweis.Deployments [INFO] Aug 01, 2018 8:30:40 AM org.jboss.arquillian.drone.webdriver.factory.remote.reusable.ReusedSessionPermanentFileStorage readStore [INFO] INFORMATION: Reused session store is not available at /home/jenkins/.drone-webdriver-session-store, a new one will be created. [INFO] Aug 01, 2018 8:31:04 AM de.staatsbibliothek.berlin.einbandnachweis.Deployments createDeployment [INFO] INFORMATION: test.war:

--------------------- The Conatiner is Started [INFO] at de.staatsbibliothek.berlin.einbandnachweis.domain.service.BeschreibungEinbandServiceIT.testdelete(BeschreibungEinbandServiceIT.java:216) [INFO] [INFO] [ERROR] testloadBeschreibungWithID(de.staatsbibliothek.berlin.einbandnachweis.domain.service.BeschreibungEinbandServiceIT) Time elapsed: 0.058 s <<< ERROR! [INFO] javax.transaction.NotSupportedException: WFTXN0001: A transaction is already in progress


If we start the build with maven deploy for normal snapshots the same code is running through.

It is possible to wait with starting all IT Tests until the container is completely started?

MrK191 commented 5 years ago

I can confirm that I have similar issue, test is starting before annotation is detected. After that tests are the ones that are in control of deployment so they are starting the container for every class.