Skip to content

Commit f4d9039

Browse files
fxbingfangxiaobing
andauthored
MINOR: Fix LogCleanerManagerTest.testLogsUnderCleanupIneligibleForCompaction() 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]>
1 parent 341e535 commit f4d9039

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/test/scala/unit/kafka/log/LogCleanerManagerTest.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -358,7 +358,7 @@ class LogCleanerManagerTest extends Logging {
358358

359359
log.appendAsLeader(records, leaderEpoch = 0)
360360
log.roll()
361-
log.appendAsLeader(records, leaderEpoch = 0)
361+
log.appendAsLeader(TestUtils.singletonRecords("test2".getBytes, key="test2".getBytes), leaderEpoch = 0)
362362
log.updateHighWatermark(2L)
363363

364364
// simulate cleanup thread working on the log partition

0 commit comments

Comments
 (0)