chiacyu commented on code in PR #15678:
URL: https://github.com/apache/kafka/pull/15678#discussion_r1562574967


##########
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);
             manager.wakeup();
-        }
+            return readyToAssert.await(1, TimeUnit.MILLISECONDS);
+        }, 1000, "Wait for ready to assert.");

Review Comment:
   Great comments, just applied. 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

Reply via email to