hemantk-12 commented on code in PR #5217:
URL: https://github.com/apache/ozone/pull/5217#discussion_r1308026768


##########
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestOzoneFileSystem.java:
##########
@@ -802,6 +802,7 @@ protected void deleteRootDir() throws IOException, 
InterruptedException {
       return;
     }
     deleteRootRecursively(fileStatuses);
+    Thread.sleep(500);

Review Comment:
   I'm surprise that `Thread.sleep()` works fine but 
[GenericTestUtils#waitFor](https://github.com/apache/ozone/blob/387c53781aae03f944906a0add58f51250d36687/hadoop-hdds/test-utils/src/main/java/org/apache/ozone/test/GenericTestUtils.java#L214)
 doesn't. Just curious what was lambda used?
   
   I feel this should work if it is just about cleaning dir.
   ```
       GenericTestUtils.waitFor(() -> {
         try {
           FileStatus[] fileStatus = fs.listStatus(ROOT);
           return fileStatus != null && fileStatus.length == 0;
         } catch (IOException e) {
           return false;
         }
       }, 100, 500);
       ```



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to