cychiu8 commented on code in PR #22252:
URL: https://github.com/apache/kafka/pull/22252#discussion_r3234878731


##########
server/src/test/java/org/apache/kafka/server/TestUtils.java:
##########
@@ -181,4 +181,76 @@ public static int awaitLeaderChange(ClusterInstance 
cluster, TopicPartition tp,
 
         return newLeaderExists.get().get();
     }
+
+    /**
+     * Wait until a leader is elected for the given partition and return the 
leader broker id.
+     *
+     * @param brokers The list of brokers
+     * @param tp The topic partition to check
+     * @param timeoutMs The duration in ms to wait for the leader
+     * @return The leader broker id
+     */
+    public static int waitUntilLeaderIsKnown(

Review Comment:
   Done. waitUntilLeaderIsKnown has been moved into FetchRequestTest as a 
protected static method.



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