I have created a JPA test with arquillian (1.1.2 final) using embedded Glassfish (3.1.2) and a test using EJBContainer in the same project. I can run the test one by one in Eclipse (Kepler) just fine (when I have a Derby running on background), but when I try to run the tests with maven
'mvn clean test'
I get the error:
Could not setup GlassFish Embedded Bootstrap
From the surefire logs I find this line:
Caused by: org.glassfish.embeddable.GlassFishException: Already bootstrapped
Now, if I comment out the test setting up the EJBContainer, I can run the Arquillian test fine with maven.
The question is, how can I make the the two test classes run "independent" of each other so that the Arquillian will not crumble down because of the embedded-container created with EJBContainer?
I have already tried closing the EJBContainer in @AfterClass method in the test class creating it.