You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by GitBox <gi...@apache.org> on 2020/01/24 22:22:32 UTC

[GitHub] [maven-surefire] Tibor17 commented on a change in pull request #267: [SUREFIRE-1741] JUnit5: Detect failed containers

Tibor17 commented on a change in pull request #267: [SUREFIRE-1741] JUnit5: Detect failed containers
URL: https://github.com/apache/maven-surefire/pull/267#discussion_r370868639
 
 

 ##########
 File path: surefire-providers/surefire-junit-platform/src/main/java/org/apache/maven/surefire/junitplatform/RunListenerAdapter.java
 ##########
 @@ -173,8 +175,9 @@ private SimpleReportEntry createReportEntry( TestIdentifier testIdentifier,
         {
             classText = null;
         }
-        String methodName = testIdentifier.isTest() ? classMethodName[2] : null;
-        String methodText = testIdentifier.isTest() ? classMethodName[3] : null;
+        boolean isFailedContainer = isFailedContainer( testIdentifier, testExecutionResult );
+        String methodName = ( isFailedContainer || testIdentifier.isTest() ) ? classMethodName[2] : null;
 
 Review comment:
   You do not have to use brackets in `( isFailedContainer || testIdentifier.isTest() )`. There is no collision between boolean and String in this case.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services