jsancio commented on code in PR #12963:
URL: https://github.com/apache/kafka/pull/12963#discussion_r1044743802


##########
core/src/test/scala/unit/kafka/server/metadata/BrokerMetadataListenerTest.scala:
##########
@@ -166,15 +172,15 @@ class BrokerMetadataListenerTest {
       image = newImage
     }
 
-    override def publishedOffset: Long = -1
+    override def publishedEndOffset: Long = -1
   }
 
   private val FOO_ID = Uuid.fromString("jj1G9utnTuCegi_gpnRgYw")
   private val BAR_ID = Uuid.fromString("SzN5j0LvSEaRIJHrxfMAlg")
 
   private def generateManyRecords(listener: BrokerMetadataListener,
                                   endOffset: Long): Unit = {
-    (0 to 10000).foreach { _ =>
+    (0 until 10000).foreach { _ =>
       listener.handleCommit(
         RecordTestUtils.mockBatchReader(
           endOffset,

Review Comment:
   This code generates 10k batches and sends them to the state machine but they 
all have the same base offset and end offset, no? You could imagine a listener 
implementation that ignores batches with offset that it already applied.



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

Reply via email to