XComp commented on a change in pull request #15415:
URL: https://github.com/apache/flink/pull/15415#discussion_r604630806



##########
File path: 
flink-yarn-tests/src/test/java/org/apache/flink/yarn/YARNSessionFIFOITCase.java
##########
@@ -152,33 +154,32 @@ void runDetachedModeTest(Map<String, String> 
securityProperties) throws Exceptio
 
         jobRunner.join();
 
+        final long timeoutInSecs = 20;
+        final long testConditionIntervalInMillis = 500;
         // in "new" mode we can only wait after the job is submitted, because 
TMs
         // are spun up lazily
-        LOG.info("Waiting until two containers are running");
         // wait until two containers are running
-        while (getRunningContainers() < 2) {
-            sleep(500);
-        }
+        LOG.info("Waiting until two containers are running");
+        CommonTestUtils.waitUntilCondition(
+                () -> getRunningContainers() == 2,

Review comment:
       I thought the same but decided differently because I having more than 2 
containers would be, afaiu, be an invalid state as well. Would you agree?




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


Reply via email to