Don't modify TestPlan

Although `TestPlan` exposes an `add(TestIdentifier)` method, it was only
ever intended for internal use by JUnit's `DefaultLauncher` which
already adds dynamic test identifiers to the `TestPlan`. The JUnit team
is going to make the `add()` throw an exception on modifications from
listeners. Thus, this commit removes the unnecessary call.
This commit is contained in:
Marc Philipp
2019-01-14 14:20:23 +01:00
committed by Anna.Kozlova
parent 0f1f00a926
commit bbe75f3580
@@ -164,11 +164,6 @@ public class JUnit5TestExecutionListener implements TestExecutionListener {
}
}
@Override
public void dynamicTestRegistered(TestIdentifier testIdentifier) {
myTestPlan.add(testIdentifier);
}
@Override
public void executionFinished(TestIdentifier testIdentifier, TestExecutionResult testExecutionResult) {
final TestExecutionResult.Status status = testExecutionResult.getStatus();