chiacyu commented on code in PR #15678: URL: https://github.com/apache/kafka/pull/15678#discussion_r1557842174
########## server/src/test/java/org/apache/kafka/server/AssignmentsManagerTest.java: ########## @@ -172,10 +172,11 @@ public void testAssignmentAggregation() throws InterruptedException { manager.onAssignment(new TopicIdPartition(TOPIC_1, 3), DIR_3, () -> { }); manager.onAssignment(new TopicIdPartition(TOPIC_1, 4), DIR_1, () -> { }); manager.onAssignment(new TopicIdPartition(TOPIC_2, 5), DIR_2, () -> { }); - while (!readyToAssert.await(1, TimeUnit.MILLISECONDS)) { + TestUtils.waitForCondition(() -> { time.sleep(100); Review Comment: I tried to remove the sleep but the test would failed because the readyToAssert.await() would not work as expected. Any ideas on that? Thanks! -- 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