adoroszlai commented on a change in pull request #2991:
URL: https://github.com/apache/ozone/pull/2991#discussion_r785303916



##########
File path: 
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/TestKeyDeletingService.java
##########
@@ -137,6 +137,10 @@ public void checkIfDeleteServiceWithFailingSCM()
 
     final int keyCount = 100;
     createAndDeleteKeys(keyManager, keyCount, 1);
+    // Wait for the KeyDeletingService to pick up all the keys.
+    // There isn't any time-consuming code after the deleteKey call - which can
+    // cause assertion failures.
+    Thread.sleep(2000);

Review comment:
       Instead of adding fix sleep, it is better to check repeatedly with 
`GenericTestUtils.waitFor`, which lets the test pass sooner if the condition is 
met.  This allows increasing max. wait time without affecting usual run time.




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