jim0987795064 commented on code in PR #20068:
URL: https://github.com/apache/kafka/pull/20068#discussion_r2190907145
##########
core/src/test/scala/integration/kafka/api/PlaintextAdminIntegrationTest.scala:
##########
@@ -2864,6 +2864,15 @@ class PlaintextAdminIntegrationTest extends
BaseAdminIntegrationTest {
val partition2 = new TopicPartition("elect-preferred-leaders-topic-2", 0)
createTopicWithAssignment(partition2.topic, Map[Int,
Seq[Int]](partition2.partition -> prefer0))
+ def sleepMillis(durationMs: Long): Unit = {
+ val startTime = System.currentTimeMillis()
+ TestUtils.waitUntilTrue(
+ () => System.currentTimeMillis() - startTime >= durationMs,
+ s"Waited less than $durationMs ms",
+ durationMs
+ )
+ }
Review Comment:
Hello @m1a2st , Thank you for pointing out this!
I've changed the first parameter of waitUntilTrue to check if metadata has
been propagated to each broker
--
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]