This content has been marked as final.
Show 2 replies
-
1. Re: How to force Arquillian to shutdown its embedded container
aslak Jul 20, 2013 2:25 PM (in response to mjremijan)You could in theory configure the Arquillian Container to start/stop on class level by setting the mode on the container element in arquillian.xml
<container mode="class">
But that would of course start and stop the container for every Test Class. Might not be what you want.
Another option would be to configure the build to have two executions, one that runs the arquillian tests and one that runs the other.
Similar to:
<build> <plugins> <plugin> <artifactId>maven-surefire-plugin</artifactId> <configuration> <includes> <include>**/non-arq/*TestCase*</include> </includes> </configuration> <executions> <execution> <id>arquillian</id> <goals> <goal>test</goal> </goals> <phase>test</phase> <configuration> <includes> <include>**/arquillian/*TestCase*</include> </includes> </configuration> </execution> </executions> </plugin> </plugins> </build>
-
2. Re: How to force Arquillian to shutdown its embedded container
doegi Nov 12, 2013 4:07 PM (in response to aslak)I came across this post after a google search for the "Already bootstrapped" error message. After hours of searching for a solutions, I figured that the glassfish-embedded-container plugin for Arquillian tries to bootstrap the embedded Glassfish multiple times. A simple workaround is to force a new JVM for each test class:
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.16</version>
<configuration>
<reuseForks>false</reuseForks>
</configuration>
</plugin>