Owen-CH-Leung commented on code in PR #15489:
URL: https://github.com/apache/kafka/pull/15489#discussion_r1548061572


##########
tools/src/test/java/org/apache/kafka/tools/GetOffsetShellTest.java:
##########
@@ -391,4 +420,15 @@ private String[] addBootstrapServer(String... args) {
 
         return newArgs.toArray(new String[0]);
     }
+
+    private void retryUntilEqual(List<Row> expected, Supplier<List<Row>> 
outputSupplier) {
+        try {
+            TestUtils.waitForCondition(
+                    () -> expected.equals(outputSupplier.get()),
+                    "TopicOffsets did not match. Expected: " + 
expectedTestTopicOffsets() + ", but was: " + outputSupplier.get()

Review Comment:
   So sth like below ? Print out the final offset as error msg for debugging ?
   ```
   TestUtils.waitForCondition(
                       () -> expected.equals(outputSupplier.get()),
                       "TopicOffsets did not match. Expected: " + 
expectedTestTopicOffsets() + ", but was: "
                               + outputSupplier.get() + ". Final offsets: " + 
getFinalOffsets()
               );
   ```



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