JyotinderSingh commented on a change in pull request #2991:
URL: https://github.com/apache/ozone/pull/2991#discussion_r785323523
##########
File path:
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/TestKeyDeletingService.java
##########
@@ -139,8 +143,22 @@ public void checkIfDeleteServiceWithFailingSCM()
createAndDeleteKeys(keyManager, keyCount, 1);
KeyDeletingService keyDeletingService =
(KeyDeletingService) keyManager.getDeletingService();
- Assert.assertEquals(
- keyManager.getPendingDeletionKeys(Integer.MAX_VALUE).size(), keyCount);
+ GenericTestUtils.waitFor(
+ () -> {
+ try {
+ int numPendingDeletionKeys =
+ keyManager.getPendingDeletionKeys(Integer.MAX_VALUE).size();
+ if (numPendingDeletionKeys != keyCount) {
+ LOG.error("Expected {} keys to be pending deletion, but got {}",
+ keyCount, numPendingDeletionKeys);
+ return false;
+ }
+ return true;
+ } catch (IOException e) {
+ LOG.error("Error while getting pending deletion keys.");
Review comment:
Done ✅
##########
File path:
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/TestKeyDeletingService.java
##########
@@ -139,8 +143,22 @@ public void checkIfDeleteServiceWithFailingSCM()
createAndDeleteKeys(keyManager, keyCount, 1);
KeyDeletingService keyDeletingService =
(KeyDeletingService) keyManager.getDeletingService();
- Assert.assertEquals(
- keyManager.getPendingDeletionKeys(Integer.MAX_VALUE).size(), keyCount);
+ GenericTestUtils.waitFor(
+ () -> {
+ try {
+ int numPendingDeletionKeys =
+ keyManager.getPendingDeletionKeys(Integer.MAX_VALUE).size();
+ if (numPendingDeletionKeys != keyCount) {
+ LOG.error("Expected {} keys to be pending deletion, but got {}",
Review comment:
Done ✅
--
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]