divijvaidya commented on code in PR #12189:
URL: https://github.com/apache/kafka/pull/12189#discussion_r878437206


##########
core/src/test/scala/integration/kafka/admin/TopicCommandIntegrationTest.scala:
##########
@@ -697,6 +697,19 @@ class TopicCommandIntegrationTest extends 
KafkaServerTestHarness with Logging wi
     try {
       killBroker(0)
       killBroker(1)
+
+      val aliveServers = brokers.filterNot(brokers => brokers.config.brokerId 
== 0 || brokers.config.brokerId == 1)
+
+      if (isKRaftTest()) {
+        TestUtils.ensureConsistentKRaftMetadata(aliveServers, controllerServer,

Review Comment:
   Thank you for the review and suggestion. I have made two changes based on 
your suggestion:
   1. Added a helper method `aliveBrokers` in KafkaServerTestHarness()
   2. Modified KafkaServerTestHarness.ensureConsistentKRaftMetadata() to check 
for only the brokers which are alive
   
   Separately, if you have thoughts on further simplification (especially 
around combining the logic of Zk and kraft in a single helper function), I 
would be happy to make the change.



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