showuon commented on code in PR #15719:
URL: https://github.com/apache/kafka/pull/15719#discussion_r1568045423
##########
core/src/test/scala/unit/kafka/log/LogManagerTest.scala:
##########
@@ -413,7 +413,7 @@ class LogManagerTest {
assertEquals(numMessages * setSize / segmentBytes, log.numberOfSegments,
"Check we have the expected number of segments.")
// this cleanup shouldn't find any expired segments but should delete some
to reduce size
- time.sleep(logManager.InitialTaskDelayMs)
+ time.sleep(logManager.initialTaskDelayMs)
assertEquals(6, log.numberOfSegments, "Now there should be exactly 6
segments")
time.sleep(log.config.fileDeleteDelayMs + 1)
Review Comment:
> Huge thanks ! I'm a little confused about the comment above, the test in
LogManagerTest itself verify that tasks like log cleanup, flush logs are
triggered after sleeping initialTaskDelayMs.
Yes, and currently, all of them are setting
`initialTaskDelayMs=LogConfig.DEFAULT_INITIAL_TASK_DELAY_MS`. I'm thinking we
could have a test and set `initialTaskDelayMs` to, let's say, 1000, and we can
verify the change is adopted by verifying if we sleep only 1000ms, the log
cleanup will be triggered.
--
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]