ijuma commented on code in PR #14529:
URL: https://github.com/apache/kafka/pull/14529#discussion_r1356961289


##########
core/src/test/scala/unit/kafka/log/LogCleanerParameterizedIntegrationTest.scala:
##########
@@ -120,12 +120,13 @@ class LogCleanerParameterizedIntegrationTest extends 
AbstractLogCleanerIntegrati
 
     // Set the last modified time to an old value to force deletion of old 
segments
     val endOffset = log.logEndOffset
-    log.logSegments.foreach(_.lastModified = time.milliseconds - (2 * 
retentionMs))
+    log.logSegments.forEach(_.setLastModified(time.milliseconds - (2 * 
retentionMs)))
     TestUtils.waitUntilTrue(() => log.logStartOffset == endOffset,
       "Timed out waiting for deletion of old segments")
     assertEquals(1, log.numberOfSegments)
 
     cleaner.shutdown()
+    closeLog(log)

Review Comment:
   I noticed we did not close the log before reopening it a bit later. It 
didn't seem to cause any problems, but it made it more difficult to debug test 
failures (since the behavior is not clearly defined in this case).



-- 
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: jira-unsubscr...@kafka.apache.org

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

Reply via email to