org.ops4j.pax.exam2
org.ops4j.pax.exam2 copied to clipboard
PaxExam doesn't stop per-suite container when tests are filtered by category [PAXEXAM-901]
Dan Berindei created PAXEXAM-901
JUnit doesn't have suite listeners. ReactorManager tries to emulate them by tracking test classes for which a runner was created and calling afterSuite() on the reactor when there are 0 classes left.
This breaks down when some tests are excluded because of their categories (e.g. in Surefire using <groups/> and <excludedGroups/>). Runners are still created for the excluded tests, but then some of them are excluded in ParentRunner.filter(), and the testClasses set in ReactorManager never becomes empty.
A javadoc comment in SingletonStageReactor says "The teardown logic is postponed to a JVM shutdown hook.", but I haven't found that shutdown hook.
In our POM we filter tests by category so that we can run the reactor-per-suite tests in one JVM and the reactor-per-class/reactor-per-method tests in another JVM (as a workaround for PAXEXAM-639 ).
Affects: 4.11.0 Votes: 0, Watches: 1