Copilot commented on code in PR #3653:
URL: https://github.com/apache/maven-surefire/pull/3653#discussion_r4749663787
##########
surefire-providers/surefire-junit-platform/src/main/java/org/apache/maven/surefire/junitplatform/RunListenerAdapter.java:
##########
@@ -448,7 +514,9 @@ private SimpleReportEntry createReportEntry(
}
StackTraceWriter stw =
testExecutionResult == null ? null :
toStackTraceWriter(className, methodName, testExecutionResult);
- String testId = testIdentifier.isTest() ? testIdentifier.getUniqueId()
: methodName;
+ // A method container, like a @ParameterizedTest, goes by its unique
id too: a nested class can have a
+ // method with the same signature, and both report under the outer
class.
+ String testId = isIndexedByUniqueId(testIdentifier) ?
testIdentifier.getUniqueId() : methodName;
Review Comment:
A disabled nested `@ParameterizedClass` encountered in two invocations of an
outer `@ParameterizedClass` receives the same run ID for both skipped entries
because these class containers share the outer source name and legacy name. The
XML reporter groups them as reruns of one test, undercounting `tests`/`skipped`
and emitting only one testcase when reruns are enabled. Include containers
counted as skipped tests in unique-ID indexing so each outer invocation remains
distinct.
--
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]