dengziming commented on code in PR #12112:
URL: https://github.com/apache/kafka/pull/12112#discussion_r866494535


##########
core/src/test/scala/integration/kafka/admin/TopicCommandIntegrationTest.scala:
##########
@@ -586,11 +586,14 @@ class TopicCommandIntegrationTest extends 
KafkaServerTestHarness with Logging wi
     try {
       killBroker(0)
       val aliveServers = brokers.filterNot(_.config.brokerId == 0)
-      TestUtils.waitForPartitionMetadata(aliveServers, testTopicName, 0)
+      TestUtils.waitUntilTrue(

Review Comment:
   @divijvaidya I really appreciate your suggestion, however, I need to clarify 
something here: 
   1. We should use `TestUtils.waitForBrokersOutOfIsr` not 
`TestUtils.waitForBrokersInIsr`
   2. `TestUtils.waitForBrokersInIsr` needs to send RPC but we can directly use 
MetadataCache which is in the memory, so it's faster and more reliable, maybe 
we can improve `TestUtils.waitForBrokersInIsr`  in the future
   3. This is most important, in another PR we found we can use a more generic 
way in KRaft mode, which waits until the brokers have caught up to the 
controller metadata topic end offset, instead of waiting for something really 
specific.



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