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_r370871042
##########
File path:
surefire-providers/surefire-junit-platform/src/main/java/org/apache/maven/surefire/junitplatform/RunListenerAdapter.java
##########
@@ -185,6 +188,13 @@ private SimpleReportEntry createReportEntry(
TestIdentifier testIdentifier,
stw, elapsedTime, reason, systemProperties );
}
+ private boolean isFailedContainer( TestIdentifier testIdentifier,
+ TestExecutionResult testExecutionResult )
+ {
+ return testIdentifier.isContainer() && testExecutionResult != null
Review comment:
The call of callback method with `null` in `TestExecutionListener` does not
make sense. Eventhough the Javadoc on `TestExecutionListener` does not say
anything about passing the null to the method parameter.
Here static import of whole `TestExecutionResult.Status.FAILED` whould make
the line brief.
----------------------------------------------------------------
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