showuon commented on code in PR #18534: URL: https://github.com/apache/kafka/pull/18534#discussion_r1917571837
########## core/src/test/scala/unit/kafka/log/LogCleanerTest.scala: ########## @@ -1218,18 +1217,18 @@ class LogCleanerTest extends Logging { def distinctValuesBySegment = log.logSegments.asScala.map(s => s.log.records.asScala.map(record => TestUtils.readString(record.value)).toSet.size).toSeq - val disctinctValuesBySegmentBeforeClean = distinctValuesBySegment + val distinctValuesBySegmentBeforeClean = distinctValuesBySegment assertTrue(distinctValuesBySegment.reverse.tail.forall(_ > N), "Test is not effective unless each segment contains duplicates. Increase segment size or decrease number of keys.") cleaner.clean(LogToClean(new TopicPartition("test", 0), log, 0, firstUncleanableOffset)) val distinctValuesBySegmentAfterClean = distinctValuesBySegment - assertTrue(disctinctValuesBySegmentBeforeClean.zip(distinctValuesBySegmentAfterClean) + assertTrue(distinctValuesBySegmentBeforeClean.zip(distinctValuesBySegmentAfterClean) .take(numCleanableSegments).forall { case (before, after) => after < before }, "The cleanable segments should have fewer number of values after cleaning") - assertTrue(disctinctValuesBySegmentBeforeClean.zip(distinctValuesBySegmentAfterClean) + assertTrue(distinctValuesBySegmentBeforeClean.zip(distinctValuesBySegmentAfterClean) Review Comment: nice catch! ########## core/src/test/scala/unit/kafka/log/LogCleanerTest.scala: ########## @@ -1241,9 +1240,9 @@ class LogCleanerTest extends Logging { val log = makeLog(config = LogConfig.fromProps(logConfig.originals, logProps)) // create 6 segments with only one message in each segment - def createRecorcs = TestUtils.singletonRecords(value = Array.fill[Byte](25)(0), key = 1.toString.getBytes) + def createRecords = TestUtils.singletonRecords(value = Array.fill[Byte](25)(0), key = 1.toString.getBytes) Review Comment: nice catch! -- 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