dengziming commented on code in PR #12104: URL: https://github.com/apache/kafka/pull/12104#discussion_r872006433
########## core/src/test/scala/integration/kafka/admin/TopicCommandIntegrationTest.scala: ########## @@ -732,7 +733,18 @@ class TopicCommandIntegrationTest extends KafkaServerTestHarness with Logging wi try { killBroker(0) val aliveServers = brokers.filterNot(_.config.brokerId == 0) - TestUtils.waitForPartitionMetadata(aliveServers, underMinIsrTopic, 0) + + if (isKRaftTest()) { + TestUtils.ensureConsistentKRaftMetadata(aliveServers, controllerServer, "Timeout waiting for topic configs propagating to brokers") + } else { + TestUtils.waitUntilTrue( + () => aliveServers.forall( + broker => + broker.metadataCache.getPartitionInfo(underMinIsrTopic, 0).get.isr().size() < 6 && + broker.metadataCache.getPartitionInfo(offlineTopic, 0).get.leader() == MetadataResponse.NO_LEADER_ID), Review Comment: This `offlineTopic` is used to test the logic of offline partitions, we set its replica assignment to `new NewTopic(offlineTopic, Collections.singletonMap(0, Collections.singletonList(0))` manually, which means it only has one replica, and will have no leader after we kill broker 0. -- 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