Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.12
-
None
-
Linux 3.0.0-15-generic #26-Ubuntu SMP x86_64 x86_64 x86_64 GNU/Linux
Junit 4.10
Description
Hi!
We have a maven-project containing multiple modules. Our junit tests are annotated with categories (@Category annotation). If we start the test with:
mvn clean verify -Dgroups=org.example.MyCategory
everything works as expected (only MyCategory-annotated tests are executed).
But in parallel mode all tests are executed!
I have attached an example project to demonstrate the bug.
When executing:
mvn clean verify -Dgroups=org.example.MyCategory
two test are executed.
When executing:
mvn clean verify -Dgroups=org.example.MyCategory -Pparallel
four tests are executed.
The parallel profile looks like this:
<profile>
<id>parallel</id>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.12</version>
<configuration>
<parallel>methods</parallel>
<threadCount>2</threadCount>
<perCoreThreadCount>false</perCoreThreadCount>
</configuration>
</plugin>
</plugins>
</build>
</profile>