Tibor17 commented on a change in pull request #333: URL: https://github.com/apache/maven-surefire/pull/333#discussion_r566113145
########## File path: maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/SurefireHelper.java ########## @@ -142,7 +142,9 @@ public static void reportExecution( SurefireReportParameters reportParameters, R PluginConsoleLogger log, Exception firstForkException ) throws MojoFailureException, MojoExecutionException { - if ( firstForkException == null && !result.isTimeout() && result.isErrorFree() ) + if ( firstForkException == null && !result.isTimeout() && result.isErrorFree() Review comment: @oehme My proposal: ``` boolean isError = firstForkException != null || result.isTimeout() || !result.isErrorFree(); boolean isFlaky = reportParameters.getFailOnFlakeCount() > 0 && result.getFlakes() >= reportParameters.getFailOnFlakeCount(); if ( isError || isFlaky ) { ... } else { if ( isError ) { msg.append( "There are test failures." ); } if ( isFlaky ) { msg.append( "There are too many flakes." ); } msg.append( "\n\nPlease refer to " ); } ``` ---------------------------------------------------------------- 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: us...@infra.apache.org