divijvaidya commented on code in PR #17794:
URL: https://github.com/apache/kafka/pull/17794#discussion_r1840213747


##########
core/src/test/java/kafka/log/remote/RemoteLogManagerTest.java:
##########
@@ -2765,6 +2765,34 @@ public void 
testDeleteRetentionMsBeingCancelledBeforeSecondDelete() throws Remot
         verify(remoteStorageManager).deleteLogSegmentData(metadataList.get(1));
     }
 
+    @Test
+    public void testDeleteRetentionMsBiggerThanTimeMs() throws 
RemoteStorageException, ExecutionException, InterruptedException {
+        LogConfig mockLogConfig = new LogConfig(Map.of("retention.ms", 
time.milliseconds() + 100));

Review Comment:
   If, let's say, test is running on a slow machine and by the time we reach to 
build `RetentionTimeData`, 100ms has already elapsed since the start of the 
test, in those cases, our cleanupUntilMs will actually become positive, leading 
to a flaky test.
   
   Could we set this value to a large value such as 1 month after current epoch?



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

Reply via email to