Copilot commented on code in PR #3653:
URL: https://github.com/apache/maven-surefire/pull/3653#discussion_r4729339363


##########
surefire-providers/surefire-junit-platform/src/main/java/org/apache/maven/surefire/junitplatform/RunListenerAdapter.java:
##########
@@ -177,9 +177,10 @@ public void executionFinished(TestIdentifier 
testIdentifier, TestExecutionResult
                         forgetTestRunId(testIdentifier, aborted);
                     } else if (isClass) {
                         reportAbortedClass(testIdentifier, 
testExecutionResult, elapsed, isTestSet);
-                    } else {
-                        runListener.testSetCompleted(
-                                createReportEntry(testIdentifier, 
testExecutionResult, systemProps(), null, elapsed));
+                    } else if (isMethodContainerWithoutTests(testIdentifier)) {
+                        // Like a @ParameterizedTest whose arguments source 
hit an assumption: count it as skipped
+                        runListener.testAssumptionFailure(
+                                createReportEntry(testIdentifier, 
testExecutionResult, elapsed));

Review Comment:
   If a class contains only a parameterized test whose arguments source aborts, 
and its `@AfterAll` also aborts, this reports the method as skipped without 
marking its class ancestors in `classContainersWithStartedTests`. 
`reportAbortedClass()` then emits another synthetic `initializationError` skip, 
counting one test twice. Call `recordStartedTest(testIdentifier)` here and add 
a regression test where both the method container and its enclosing class abort.



-- 
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]

Reply via email to