You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2022/01/15 12:35:16 UTC

[GitHub] [ozone] adoroszlai commented on a change in pull request #2991: HDDS-6183. Intermittent failure in TestKeyDeletingService.checkIfDeleteServiceWithFailingSCM.

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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org