mumrah commented on code in PR #19094:
URL: https://github.com/apache/kafka/pull/19094#discussion_r1980052523


##########
core/src/test/java/kafka/test/api/AdminClientRebootstrapTest.java:
##########
@@ -84,7 +85,8 @@ public void testRebootstrap(ClusterInstance clusterInstance) 
throws ExecutionExc
             server1.awaitShutdown();
 
             // Only the server 0 is available for the admin client during the 
bootstrap.
-            admin.listTopics().names().get();
+            TestUtils.waitForCondition(() -> 
admin.listTopics().names().get().contains(topic),

Review Comment:
   This `get()` will still block until the future completes. What I was 
suggestion was that we do something like `.get(5, TimeUnit.MINUTES)` or some 
reasonable timeout. This would prevent the test from getting stuck if something 
went wrong.
   
   Adding the waitForCondition is a good improvement. It will make this test 
more reliable. 



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