XComp commented on a change in pull request #15415:
URL: https://github.com/apache/flink/pull/15415#discussion_r604636080
##########
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)),
+ testConditionIntervalInMillis,
+ "We didn't reach the state of two containers running (instead:
"
+ + getRunningContainers()
+ + ")");
// make sure we have two TMs running in either mode
Review comment:
I removed it as it does not add any value 👍
--
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]