Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Minor
-
Resolution: Fixed
-
Affects Version/s: 2.12
-
Fix Version/s: 2.12.1
-
Component/s: Junit 4.7+ (parallel) support
-
Labels:None
-
Complexity:Intermediate
-
Number of attachments :
Description
Revision 1228960 seems to break parallel tests.
See ConfigurableParallelComputer.java.
before: Call to super.getRunner returns a ParentRunner that ConfigurableParallelComputer.getRunner passes directly to parallelize
after: Call to super.getRunner returns a ParentRunner, but ConfigurableParallelComputer.getRunner wraps that ParentRunner in a ClassDemarcatingRunner which it then passes to parallelize
problem: Parallelize calls setScheduler (and therefore parallelizes the tests) only for ParentRunners. Since the ParentRunner of interest is wrapped inside the ClassDemarcatingRunner, which is not a ParentRunner, parallelize does not call setScheduler.
Just some notes:
Using surefire-integration-tests/src/test/resources/parallel-runtime (added in r1358285)
mvn -o -Dsurefire.version=2.11 -DthreadCount=4 -Dparallel=methods test
2.11 gives runtime ~19sec, 2.12 gives 1min 04 secs
Switching to "classes" gives runtime of ~24.26 with both 2.11 and 2.12. So it seems "methods" was broken with this change.