Skip to content

Commit

Permalink
MINOR: Fix `LogCleanerManagerTest.testLogsUnderCleanupIneligibleForCo…
Browse files Browse the repository at this point in the history
…mpaction()` for `LogMessageTimestampType = "LogAppendTime"` (apache#12333)

While setting Defaults.LogMessageTimestampType to "LogAppendTime", `LogCleanerManagerTest.testLogsUnderCleanupIneligibleForCompaction()` fails with a InvalidTimestampException.

This PR fixes this by regenerating the records instead of previous approach of re-using same records in the test.

Reviewers: Divij Vaidya <[email protected]>, Kvicii <[email protected]>

---------

Co-authored-by: fangxiaobing <[email protected]>
  • Loading branch information
fxbing and fangxiaobing authored Jan 22, 2025
1 parent 341e535 commit f4d9039
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ class LogCleanerManagerTest extends Logging {

log.appendAsLeader(records, leaderEpoch = 0)
log.roll()
log.appendAsLeader(records, leaderEpoch = 0)
log.appendAsLeader(TestUtils.singletonRecords("test2".getBytes, key="test2".getBytes), leaderEpoch = 0)
log.updateHighWatermark(2L)

// simulate cleanup thread working on the log partition
Expand Down

0 comments on commit f4d9039

Please sign in to comment.