jim0987795064 commented on code in PR #20068:
URL: https://github.com/apache/kafka/pull/20068#discussion_r2194135377


##########
core/src/test/scala/integration/kafka/api/PlaintextAdminIntegrationTest.scala:
##########
@@ -2864,6 +2865,26 @@ class PlaintextAdminIntegrationTest extends 
BaseAdminIntegrationTest {
     val partition2 = new TopicPartition("elect-preferred-leaders-topic-2", 0)
     createTopicWithAssignment(partition2.topic, Map[Int, 
Seq[Int]](partition2.partition -> prefer0))
 
+    var prior1 = 
brokers.head.metadataCache.getPartitionLeaderEndpoint(partition1.topic, 
partition1.partition(), listenerName).get.id()
+    var prior2 = 
brokers.head.metadataCache.getPartitionLeaderEndpoint(partition2.topic, 
partition2.partition(), listenerName).get.id()
+
+    def sleepMillisToPropagateMetadata(durationMs: Long): Unit = {
+      TimeUnit.MILLISECONDS.sleep(100)

Review Comment:
   Hello @FrankYang0529 , I think we can move `TimeUnit.MILLISECONDS.sleep(100) 
here`.
   Thank you for pointing out!



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