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 2022/05/20 18:26:15 UTC

[GitHub] [kafka] divijvaidya commented on a diff in pull request #12189: Fix flaky test TopicCommandIntegrationTest.testDescribeAtMinIsrPartitions(String).quorum=kraft

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

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