This is an automated email from the ASF dual-hosted git repository.

Russole pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git


The following commit(s) were added to refs/heads/master by this push:
     new f9f61847685 HDDS-16135. Fix remaining intermittent failures in 
TestKeyLifecycleService (#11202)
f9f61847685 is described below

commit f9f61847685b15e7aa743079f0ef146053a93d9b
Author: Mark Tsai <[email protected]>
AuthorDate: Sat Sep 12 14:19:08 2026 +0800

    HDDS-16135. Fix remaining intermittent failures in TestKeyLifecycleService 
(#11202)
---
 .../hadoop/ozone/om/service/TestKeyLifecycleService.java     | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git 
a/hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/service/TestKeyLifecycleService.java
 
b/hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/service/TestKeyLifecycleService.java
index 048cafd5bc0..e67e8468286 100644
--- 
a/hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/service/TestKeyLifecycleService.java
+++ 
b/hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/service/TestKeyLifecycleService.java
@@ -375,9 +375,14 @@ void testScanStatePiggybackedOnDelete(BucketLayout 
bucketLayout, boolean createP
 
       // Verify that scan state was updated through the DeleteKeysRequest
       String bucketKey = metadataManager.getBucketKey(volumeName, bucketName);
-      OmLifecycleScanState scanState = 
metadataManager.getLifecycleScanStateTable().get(bucketKey);
-      assertNotNull(scanState);
-      assertNotNull(scanState.getScanEndTime());
+      GenericTestUtils.waitFor(() -> {
+        try {
+          OmLifecycleScanState scanState = 
metadataManager.getLifecycleScanStateTable().get(bucketKey);
+          return scanState != null && scanState.getScanEndTime() != null;
+        } catch (IOException e) {
+          return false;
+        }
+      }, WAIT_CHECK_INTERVAL, 10000);
 
       deleteLifecyclePolicy(volumeName, bucketName);
     }
@@ -2594,6 +2599,7 @@ void testMultipleDirectoriesMatched(String keyPrefix1, 
String keyPrefix2, String
         LOG.info("Dir {} refreshes its modification time", dirName);
         KeyInfoWithVolumeContext keyInfo2 = getDirectory(volumeName, 
bucketName, dirName);
         assertNotEquals(keyInfo.getKeyInfo().getModificationTime(), 
keyInfo2.getKeyInfo().getModificationTime());
+        awaitDirCacheDrained(volumeName, bucketName);
       }
 
       // resume KeyLifecycleService bucket scan


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

Reply via email to