azagrebin commented on a change in pull request #11073: [FLINK-15672][build] 
Migrate to log4j2 
URL: https://github.com/apache/flink/pull/11073#discussion_r381906452
 
 

 ##########
 File path: 
flink-yarn-tests/src/test/java/org/apache/flink/yarn/YarnTestBase.java
 ##########
 @@ -817,7 +817,12 @@ protected void runWithArgs(String[] args, String 
terminateAfterString, String[]
                                }
                        }
                        // check output for the expected terminateAfterString.
-                       testPassedFromLog4j = 
logMessageSupplier.get().stream().anyMatch(s -> 
s.contains(terminateAfterString));
+                       testPassedFromLog4j = logMessageSupplier.get().stream()
+                               .filter(s -> s.contains(terminateAfterString))
+                               .limit(1)
 
 Review comment:
   will it not throw if the stream is empty after the filtering?

----------------------------------------------------------------
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

Reply via email to