muralibasani commented on code in PR #22303:
URL: https://github.com/apache/kafka/pull/22303#discussion_r3255268990


##########
tools/src/test/java/org/apache/kafka/tools/LeaderElectionCommandTest.java:
##########
@@ -447,7 +447,7 @@ private void waitForOnlineBroker(Admin client, int 
brokerId) throws InterruptedE
     }
 
     private void assertLeader(Admin client, TopicPartition topicPartition, int 
expectedLeader) throws Exception {
-        int leader = AdminUtils.fetchOrWaitForLeader(client, 
topicPartition.topic(), topicPartition.partition(), 30000);
+        int leader = AdminUtils.fetchOrWaitForExpectedLeader(client, 
topicPartition.topic(), topicPartition.partition(), expectedLeader, 30000);
         assertEquals(expectedLeader, leader);

Review Comment:
   fetchOrWaitForExpectedLeader method already returns when leader == 
expectedLEader. This assertion seems redundancy



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to