You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2021/07/09 16:06:03 UTC

[GitHub] [kafka] cmccabe commented on a change in pull request #10990: MINOR: the broker should use metadata.log.max.record.bytes.between.snapshots

cmccabe commented on a change in pull request #10990:
URL: https://github.com/apache/kafka/pull/10990#discussion_r667059387



##########
File path: core/src/test/scala/unit/kafka/server/metadata/BrokerMetadataListenerTest.scala
##########
@@ -18,28 +18,31 @@
 package kafka.server.metadata
 
 import java.util
+import java.util.concurrent.atomic.AtomicReference
 import java.util.{Collections, Optional}
 
 import org.apache.kafka.common.{Endpoint, Uuid}
-import org.apache.kafka.common.metadata.RegisterBrokerRecord
+import org.apache.kafka.common.metadata.{PartitionChangeRecord, PartitionRecord, RegisterBrokerRecord, TopicRecord}
 import org.apache.kafka.common.utils.Time
 import org.apache.kafka.image.{MetadataDelta, MetadataImage}
 import org.apache.kafka.metadata.{BrokerRegistration, RecordTestUtils, VersionRange}
 import org.apache.kafka.server.common.ApiMessageAndVersion
-import org.junit.jupiter.api.Assertions.assertEquals
+import org.junit.jupiter.api.Assertions.{assertEquals, assertTrue}
 import org.junit.jupiter.api.Test
 
 
 class BrokerMetadataListenerTest {
   @Test
   def testCreateAndClose(): Unit = {
-    val listener = new BrokerMetadataListener(0, Time.SYSTEM, None)
+    val listener = new BrokerMetadataListener(0, Time.SYSTEM, None, 1000000L,
+      (_, _, _, _) => throw new UnsupportedOperationException())

Review comment:
       It starts a thread, which we would have to stop. Also I'd like to be sure that we didn't try to create a snapshot in this case (so, didn't see the UVE exception)




-- 
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-unsubscribe@kafka.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org