You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by GitBox <gi...@apache.org> on 2020/07/16 16:08:20 UTC

[GitHub] [kafka] ning2008wisc commented on a change in pull request #9029: KAFKA-10255: Fix flaky testOneWayReplicationWithAutoOffsetSync test

ning2008wisc commented on a change in pull request #9029:
URL: https://github.com/apache/kafka/pull/9029#discussion_r455902217



##########
File path: connect/mirror/src/test/java/org/apache/kafka/connect/mirror/MirrorConnectorsIntegrationTest.java
##########
@@ -315,9 +319,34 @@ public void testReplication() throws InterruptedException {
             backup.kafka().consume(NUM_RECORDS_PRODUCED, 2 * RECORD_TRANSFER_DURATION_MS, "primary.test-topic-2").count());
     }
 
+    private void waitForConsumerGroupOffsetSync(Consumer<byte[], byte[]> consumer, List<String> topics)
+            throws InterruptedException {
+        Admin backupClient = backup.kafka().createAdminClient();
+        List<TopicPartition> tps = new ArrayList<>(NUM_PARTITIONS * topics.size());
+        IntStream.range(0, NUM_PARTITIONS).forEach(
+            partitionInd -> {

Review comment:
       could we have a more intuitive variable name for `partitionInd`? e.g. `partitionId` or `partitionIndex`?




----------------------------------------------------------------
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:
users@infra.apache.org