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



##########
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,
+                Deadline.fromNow(Duration.ofSeconds(timeoutInSecs)),

Review comment:
       It was implicitly set through the test's timeout? Do we have a rule of 
thumb for timeouts? Rather have it on the call than the test? I increased the 
per-call timeout to 1 minute and removed the overall timeout of 1 minute. This 
would give the test an overall timeout of 3 minutes now.




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