mumrah commented on code in PR #13407: URL: https://github.com/apache/kafka/pull/13407#discussion_r1173127962
########## core/src/test/scala/integration/kafka/zk/ZkMigrationIntegrationTest.scala: ########## @@ -324,4 +329,29 @@ class ZkMigrationIntegrationTest { assertTrue(firstProducerIdBlock.firstProducerId() < producerIdBlock.firstProducerId()) } } + + /** + * Start a KRaft cluster with migrations enabled, verify that the controller does not accept metadata changes + * through the RPCs + */ + @ClusterTests(Array( + new ClusterTest(clusterType = Type.KRAFT, brokers = 0, controllers = 1, metadataVersion = MetadataVersion.IBP_3_4_IV0, + serverProperties = Array(new ClusterConfigProperty(key = "zookeeper.metadata.migration.enable", value = "true"))), + new ClusterTest(clusterType = Type.KRAFT, brokers = 0, controllers = 1, metadataVersion = MetadataVersion.IBP_3_5_IV0, + serverProperties = Array(new ClusterConfigProperty(key = "zookeeper.metadata.migration.enable", value = "true"))), + new ClusterTest(clusterType = Type.KRAFT, brokers = 0, controllers = 1, metadataVersion = MetadataVersion.IBP_3_5_IV1, + serverProperties = Array(new ClusterConfigProperty(key = "zookeeper.metadata.migration.enable", value = "true"))) + )) + def testPreMigrationMode(clusterInstance: ClusterInstance): Unit = { Review Comment: Heh, the test framework is politely adding a broker for me :) This test does seem to do what I want, i see: ``` [2023-04-20 17:56:08,267] ERROR [QuorumController id=3000] createTopics: unable to start processing because of NotControllerException. Reason: The active controller appears to be node 3000 (org.apache.kafka.controller.QuorumController:445) ``` in the log, and then the create topics call times out after a short time. I've updated the test to have `brokers = 1` -- 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