FrankYang0529 commented on code in PR #20068: URL: https://github.com/apache/kafka/pull/20068#discussion_r2193889425
########## 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: In the following `TestUtils.waitUntilTrue`, it already do sleep if the condition is not matched. Do we need `TimeUnit.MILLISECONDS.sleep(100)` here? -- 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