Copilot commented on code in PR #3653:
URL: https://github.com/apache/maven-surefire/pull/3653#discussion_r4749428422
##########
surefire-providers/surefire-junit-platform/src/main/java/org/apache/maven/surefire/junitplatform/RunListenerAdapter.java:
##########
@@ -375,11 +431,7 @@ public void executionSkipped(TestIdentifier
testIdentifier, String reason) {
if (isTestSet) {
runListener.testSetStarting(report);
}
- for (TestIdentifier child : testPlan.getChildren(testIdentifier)) {
- SimpleReportEntry skipped = createReportEntry(child, null,
emptyMap(), reason, null);
- runListener.testSkipped(skipped);
- forgetTestRunId(child, skipped);
- }
+ reportSkippedChildren(testIdentifier, reason);
Review Comment:
A disabled `@Nested @ParameterizedClass` has no discovered children, so
calling this helper on that class emits no skipped entry; the empty-class
fallback inside the helper only applies to its children. If the enclosing
class's `@AfterAll` also aborts, the new `recordInClassAncestors()` call has
already marked that enclosing class as having reported tests, suppressing its
fallback too and leaving the suite with zero reported tests. Emit a skipped
entry for the skipped class itself when its child list is empty.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]