showuon commented on a change in pull request #9029: URL: https://github.com/apache/kafka/pull/9029#discussion_r463028636
########## File path: connect/mirror/src/test/java/org/apache/kafka/connect/mirror/MirrorConnectorsIntegrationTest.java ########## @@ -345,15 +342,24 @@ private void waitForConsumerGroupOffsetSync(Consumer<byte[], byte[]> consumer, L }, OFFSET_SYNC_DURATION_MS, "Consumer group offset sync is not complete in time"); } + private void waitForConsumingAllRecords(Consumer<byte[], byte[]> consumer) throws InterruptedException { + final AtomicInteger totalConsumedRecords = new AtomicInteger(0); + waitForCondition(() -> { + ConsumerRecords records = consumer.poll(Duration.ofMillis(500)); + consumer.commitSync(); Review comment: Good suggestion! Thanks. ########## File path: connect/mirror/src/test/java/org/apache/kafka/connect/mirror/MirrorConnectorsIntegrationTest.java ########## @@ -345,15 +342,24 @@ private void waitForConsumerGroupOffsetSync(Consumer<byte[], byte[]> consumer, L }, OFFSET_SYNC_DURATION_MS, "Consumer group offset sync is not complete in time"); } + private void waitForConsumingAllRecords(Consumer<byte[], byte[]> consumer) throws InterruptedException { + final AtomicInteger totalConsumedRecords = new AtomicInteger(0); + waitForCondition(() -> { + ConsumerRecords records = consumer.poll(Duration.ofMillis(500)); Review comment: Done. 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org