Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.4.2
-
None
-
Windows XP, Java 1.6
Doesn't seem like an environment specific issue
Description
When running unit tests, if a project has junit 3 unit tests, and the pom has forkMode set to always, like so
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.4.2</version>
<configuration>
<disableXmlReport>true</disableXmlReport>
<forkMode>always</forkMode>
</configuration>
</plugin>
the unit test runner invokes the suite() method of all the junit 3 unit tests, even though they will not be run within the specific fork of thats running just one unit tests. This can be confusing and may cause issues if the unit tests were doing some @BeforeClass style initializations in the suite() method. Moreover this may be inefficient.