Skip to content

Commit f7ed6ec

Browse files
committed
Fire events for empty containers to meet expectations of IDEs
Since empty container and engine descriptors are no longer pruned they show up in the test tree as "atomic tests". As such, IDEs expect events when they started/finished.
1 parent 9b15edd commit f7ed6ec

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

junit-platform-runner/src/main/java/org/junit/platform/runner/JUnitPlatformRunnerListener.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ private void fireTestIgnored(TestIdentifier testIdentifier) {
5858

5959
@Override
6060
public void executionStarted(TestIdentifier testIdentifier) {
61-
if (testIdentifier.isTest()) {
62-
Description description = findJUnit4Description(testIdentifier);
61+
Description description = findJUnit4Description(testIdentifier);
62+
if (description.isTest()) {
6363
this.notifier.fireTestStarted(description);
6464
}
6565
}
@@ -74,7 +74,7 @@ public void executionFinished(TestIdentifier testIdentifier, TestExecutionResult
7474
else if (status == FAILED) {
7575
this.notifier.fireTestFailure(toFailure(testExecutionResult, description));
7676
}
77-
if (testIdentifier.isTest()) {
77+
if (description.isTest()) {
7878
this.notifier.fireTestFinished(description);
7979
}
8080
}

0 commit comments

Comments
 (0)