ex172000 commented on code in PR #14697:
URL: https://github.com/apache/kafka/pull/14697#discussion_r1381157089


##########
core/src/test/scala/unit/kafka/log/LogValidatorTest.scala:
##########
@@ -399,12 +402,20 @@ class LogValidatorTest {
     assertEquals(i, offsetCounter.value);
     assertEquals(now + 1, validatingResults.maxTimestampMs,
       s"Max timestamp should be ${now + 1}")
-    assertEquals(1, validatingResults.shallowOffsetOfMaxTimestampMs,
+
+    val expectedShallowOffsetOfMaxTimestamp = if (magic >= 
RecordVersion.V2.value) {

Review Comment:
   Currently we have up to V2, if this behavior changes in the future, it could 
break the test? How about making it just equals V2?



##########
core/src/test/scala/unit/kafka/log/LogValidatorTest.scala:
##########
@@ -350,11 +350,14 @@ class LogValidatorTest {
         (RecordBatch.NO_PRODUCER_ID, RecordBatch.NO_PRODUCER_EPOCH, 
RecordBatch.NO_SEQUENCE, false,
           RecordBatch.NO_PARTITION_LEADER_EPOCH)
 
-    val records = MemoryRecords.withRecords(magic, 0L, CompressionType.GZIP, 
TimestampType.CREATE_TIME, producerId,
-      producerEpoch, baseSequence, partitionLeaderEpoch, isTransactional,
+    val recordList = List(

Review Comment:
   👍 



##########
core/src/test/scala/unit/kafka/log/LogValidatorTest.scala:
##########
@@ -350,11 +350,14 @@ class LogValidatorTest {
         (RecordBatch.NO_PRODUCER_ID, RecordBatch.NO_PRODUCER_EPOCH, 
RecordBatch.NO_SEQUENCE, false,
           RecordBatch.NO_PARTITION_LEADER_EPOCH)
 
-    val records = MemoryRecords.withRecords(magic, 0L, CompressionType.GZIP, 
TimestampType.CREATE_TIME, producerId,
-      producerEpoch, baseSequence, partitionLeaderEpoch, isTransactional,
+    val recordList = List(

Review Comment:
   👍 



-- 
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