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



##########
File path: 
flink-yarn-tests/src/test/java/org/apache/flink/yarn/YARNSessionFIFOITCase.java
##########
@@ -196,15 +197,16 @@ void runDetachedModeTest(Map<String, String> 
securityProperties) throws Exceptio
             ApplicationId id = app.getApplicationId();
             yc.killApplication(id);
 
-            while (getApplicationReportWithRetryOnNPE(yc, 
EnumSet.of(YarnApplicationState.KILLED))
-                                    .size()
-                            == 0
-                    && getApplicationReportWithRetryOnNPE(
-                                            yc, 
EnumSet.of(YarnApplicationState.FINISHED))
-                                    .size()
-                            == 0) {
-                sleep(500);
-            }
+            CommonTestUtils.waitUntilCondition(
+                    () ->
+                            !getApplicationReportWithRetryOnNPE(
+                                            yc,
+                                            EnumSet.of(
+                                                    
YarnApplicationState.KILLED,
+                                                    
YarnApplicationState.FINISHED))
+                                    .isEmpty(),
+                    Deadline.fromNow(Duration.ofSeconds(timeoutInSecs)),

Review comment:
       See [comment 
above](https://github.com/apache/flink/pull/15415#discussion_r604634056).




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