zentol commented on code in PR #21696:
URL: https://github.com/apache/flink/pull/21696#discussion_r1092998394


##########
flink-end-to-end-tests/flink-sql-client-test/src/test/java/SqlClientITCase.java:
##########
@@ -290,10 +290,15 @@ private void verifyNumberOfResultRecords(String 
resultFilePath, int expectedNumb
         File tempOutputFile = new File(tempDir, "records.out");
         String tempOutputFilepath = tempOutputFile.toString();
         GenericContainer<?> taskManager = flink.getTaskManagers().get(0);
-        Thread.sleep(5000); // prevent NotFoundException: Status 404
-        taskManager.copyFileFromContainer(resultFilePath, tempOutputFilepath);
-
-        int numberOfResultRecords = 
UpsertTestFileUtil.getNumberOfRecords(tempOutputFile);
+        int numberOfResultRecords;
+        while (true) {
+            Thread.sleep(5000); // prevent NotFoundException: Status 404

Review Comment:
   At the end of the way you will need to poll _something_, be it for the 
output file or the status of the job.
   
   But the sleep could be way lower; 50ms would be perfectly fine.



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to