Tibor17 commented on a change in pull request #249: Surefire-1701: Fix
@DisplayName breaking reruns
URL: https://github.com/apache/maven-surefire/pull/249#discussion_r338313152
##########
File path:
surefire-providers/surefire-junit-platform/src/main/java/org/apache/maven/surefire/junitplatform/JUnitPlatformProvider.java
##########
@@ -187,12 +188,12 @@ private LauncherDiscoveryRequest
buildLauncherDiscoveryRequestForRerunFailures(
LauncherDiscoveryRequestBuilder builder = request().filters( filters
).configurationParameters(
configurationParameters );
// Iterate over recorded failures
- for ( TestIdentifier identifier : adapter.getFailures().keySet() )
+ for ( TestIdentifier identifier : new HashSet<>(
adapter.getFailures().keySet() ) )
{
// Extract quantified test name data
String[] classMethodName = adapter.toClassMethodNameWithoutPlan(
identifier );
- String className = classMethodName[1];
- String methodName = classMethodName[3];
+ String className = classMethodName[0];
Review comment:
It would be worth to use OOP and not string array because now I can see how
it is difficult to understand the indexes of the array and their meaning. So we
have a couple of class + method, and one group is the traditional and second is
named. So the class can have annotation as well.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services