muralibasani commented on code in PR #23990:
URL: https://github.com/apache/kafka/pull/23990#discussion_r4448805810


##########
clients/clients-integration-tests/src/test/java/org/apache/kafka/clients/admin/ListOffsetsIntegrationTest.java:
##########
@@ -227,19 +227,16 @@ private void verifyListOffsets(String topic, int 
expectedMaxTimestampOffset) thr
             }
         }, "There still are ongoing reassignments");
         // make sure we are able to see the new leader
-        TestUtils.waitForCondition(() -> {
-            try {
-                return clusterInstance.getLeaderBrokerId(new 
TopicPartition(topic, 0)) == newLeader;
-            } catch (InterruptedException | ExecutionException e) {
-                return false;
-            }
-        }, () -> {
-            try {
-                return String.format("expected leader: %d but actual: %d", 
newLeader, clusterInstance.getLeaderBrokerId(new TopicPartition(topic, 0)));
-            } catch (ExecutionException | InterruptedException e) {
-                throw new RuntimeException(e);
-            }
-        });
+        TestUtils.waitForCondition(

Review Comment:
   Indeed, yes. I replaced them.



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

Reply via email to