chihsuan commented on code in PR #11145:
URL: https://github.com/apache/ozone/pull/11145#discussion_r3881142671


##########
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/service/TestKeyLifecycleService.java:
##########
@@ -3260,11 +3266,8 @@ void testKeyDeletedOrRenamed(BucketLayout bucketLayout, 
boolean deleted)
       String expectedString = "Received a request to delete a Key does not 
exist /" + key.getVolumeName() + "/" +
           key.getBucketName() + "/" + key.getKeyName();
       GenericTestUtils.waitFor(() -> 
requestLog.getOutput().contains(expectedString), WAIT_CHECK_INTERVAL, 10000);
-      if (!deleted) {
-        // Since expiration action is an absolute timestamp, so the renamed 
key will expire in next evaluation task
-        GenericTestUtils.waitFor(() -> log.getOutput().contains("1 expired 
keys and 0 expired dirs found"),

Review Comment:
   This is where the reported failure timed out, waiting for a scan to log 
exactly one expiration candidate. That count depends on whether the first 
scan's delete has landed by the time the next task starts, so it isn't an 
invariant. CI showed a run reporting 2. The wait and assertion below check what 
the test is really about: every key eventually goes, and both are actually 
deleted.



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