From edebab1682778887ee0dc49a3e25e060283fb23b Mon Sep 17 00:00:00 2001 From: Alyssa Date: Tue, 21 Sep 2021 13:51:49 -0700 Subject: [PATCH 1/5] testing if insufficient poll time results in KREST-2521 test failure --- .../v3/ConsumerLagsResourceIntegrationTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kafka-rest/src/test/java/io/confluent/kafkarest/integration/v3/ConsumerLagsResourceIntegrationTest.java b/kafka-rest/src/test/java/io/confluent/kafkarest/integration/v3/ConsumerLagsResourceIntegrationTest.java index 06722f46e1..6f4517511a 100644 --- a/kafka-rest/src/test/java/io/confluent/kafkarest/integration/v3/ConsumerLagsResourceIntegrationTest.java +++ b/kafka-rest/src/test/java/io/confluent/kafkarest/integration/v3/ConsumerLagsResourceIntegrationTest.java @@ -94,12 +94,12 @@ public void listConsumerLags_returnsConsumerLags() { consumer1.subscribe(Collections.singletonList(topic1)); consumer2.subscribe(Collections.singletonList(topic2)); - consumer1.poll(Duration.ofSeconds(5)); - consumer2.poll(Duration.ofSeconds(5)); + consumer1.poll(Duration.ofSeconds(1)); + consumer2.poll(Duration.ofSeconds(1)); // After polling once, only one of the consumers will be member of the group, so we poll again // to force the other consumer to join the group. - consumer1.poll(Duration.ofSeconds(5)); - consumer2.poll(Duration.ofSeconds(5)); +// consumer1.poll(Duration.ofSeconds(5)); +// consumer2.poll(Duration.ofSeconds(5)); // commit offsets from consuming from subscribed topics consumer1.commitSync(); consumer2.commitSync(); From eec08cc734eecf46881151ef730ea5531a63ef21 Mon Sep 17 00:00:00 2001 From: Alyssa Date: Tue, 21 Sep 2021 15:57:21 -0700 Subject: [PATCH 2/5] spacing --- .../v3/ConsumerLagsResourceIntegrationTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kafka-rest/src/test/java/io/confluent/kafkarest/integration/v3/ConsumerLagsResourceIntegrationTest.java b/kafka-rest/src/test/java/io/confluent/kafkarest/integration/v3/ConsumerLagsResourceIntegrationTest.java index 6f4517511a..d332f53414 100644 --- a/kafka-rest/src/test/java/io/confluent/kafkarest/integration/v3/ConsumerLagsResourceIntegrationTest.java +++ b/kafka-rest/src/test/java/io/confluent/kafkarest/integration/v3/ConsumerLagsResourceIntegrationTest.java @@ -96,10 +96,10 @@ public void listConsumerLags_returnsConsumerLags() { consumer2.subscribe(Collections.singletonList(topic2)); consumer1.poll(Duration.ofSeconds(1)); consumer2.poll(Duration.ofSeconds(1)); - // After polling once, only one of the consumers will be member of the group, so we poll again - // to force the other consumer to join the group. -// consumer1.poll(Duration.ofSeconds(5)); -// consumer2.poll(Duration.ofSeconds(5)); + // // After polling once, only one of the consumers will be member of the group, so we poll again + // // to force the other consumer to join the group. + // consumer1.poll(Duration.ofSeconds(5)); + // consumer2.poll(Duration.ofSeconds(5)); // commit offsets from consuming from subscribed topics consumer1.commitSync(); consumer2.commitSync(); From b43984dcc1a4c2db735298d2fff6afdfe0d7aa3e Mon Sep 17 00:00:00 2001 From: Alyssa Date: Wed, 22 Sep 2021 10:37:58 -0700 Subject: [PATCH 3/5] spacing --- .../integration/v3/ConsumerLagsResourceIntegrationTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kafka-rest/src/test/java/io/confluent/kafkarest/integration/v3/ConsumerLagsResourceIntegrationTest.java b/kafka-rest/src/test/java/io/confluent/kafkarest/integration/v3/ConsumerLagsResourceIntegrationTest.java index d332f53414..110820cc1c 100644 --- a/kafka-rest/src/test/java/io/confluent/kafkarest/integration/v3/ConsumerLagsResourceIntegrationTest.java +++ b/kafka-rest/src/test/java/io/confluent/kafkarest/integration/v3/ConsumerLagsResourceIntegrationTest.java @@ -96,8 +96,8 @@ public void listConsumerLags_returnsConsumerLags() { consumer2.subscribe(Collections.singletonList(topic2)); consumer1.poll(Duration.ofSeconds(1)); consumer2.poll(Duration.ofSeconds(1)); - // // After polling once, only one of the consumers will be member of the group, so we poll again - // // to force the other consumer to join the group. + // After polling once, only one of the consumers will be member of the group, so we poll again + // to force the other consumer to join the group. // consumer1.poll(Duration.ofSeconds(5)); // consumer2.poll(Duration.ofSeconds(5)); // commit offsets from consuming from subscribed topics From 03ca982580562d6bcefee56e7e3fd45fece7d669 Mon Sep 17 00:00:00 2001 From: Alyssa Date: Wed, 22 Sep 2021 13:31:52 -0700 Subject: [PATCH 4/5] confirmed error, increasing poll time --- .../v3/ConsumerLagsResourceIntegrationTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kafka-rest/src/test/java/io/confluent/kafkarest/integration/v3/ConsumerLagsResourceIntegrationTest.java b/kafka-rest/src/test/java/io/confluent/kafkarest/integration/v3/ConsumerLagsResourceIntegrationTest.java index 110820cc1c..06722f46e1 100644 --- a/kafka-rest/src/test/java/io/confluent/kafkarest/integration/v3/ConsumerLagsResourceIntegrationTest.java +++ b/kafka-rest/src/test/java/io/confluent/kafkarest/integration/v3/ConsumerLagsResourceIntegrationTest.java @@ -94,12 +94,12 @@ public void listConsumerLags_returnsConsumerLags() { consumer1.subscribe(Collections.singletonList(topic1)); consumer2.subscribe(Collections.singletonList(topic2)); - consumer1.poll(Duration.ofSeconds(1)); - consumer2.poll(Duration.ofSeconds(1)); + consumer1.poll(Duration.ofSeconds(5)); + consumer2.poll(Duration.ofSeconds(5)); // After polling once, only one of the consumers will be member of the group, so we poll again // to force the other consumer to join the group. - // consumer1.poll(Duration.ofSeconds(5)); - // consumer2.poll(Duration.ofSeconds(5)); + consumer1.poll(Duration.ofSeconds(5)); + consumer2.poll(Duration.ofSeconds(5)); // commit offsets from consuming from subscribed topics consumer1.commitSync(); consumer2.commitSync(); From a04b7443725f59264631e6b8be51f989dca229d5 Mon Sep 17 00:00:00 2001 From: Alyssa Huang <51169659+ahuang98@users.noreply.github.com> Date: Mon, 27 Sep 2021 11:45:26 -0700 Subject: [PATCH 5/5] increasing consumer poll time --- .../v3/ConsumerLagsResourceIntegrationTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kafka-rest/src/test/java/io/confluent/kafkarest/integration/v3/ConsumerLagsResourceIntegrationTest.java b/kafka-rest/src/test/java/io/confluent/kafkarest/integration/v3/ConsumerLagsResourceIntegrationTest.java index 06722f46e1..99ec1d4e7e 100644 --- a/kafka-rest/src/test/java/io/confluent/kafkarest/integration/v3/ConsumerLagsResourceIntegrationTest.java +++ b/kafka-rest/src/test/java/io/confluent/kafkarest/integration/v3/ConsumerLagsResourceIntegrationTest.java @@ -94,12 +94,12 @@ public void listConsumerLags_returnsConsumerLags() { consumer1.subscribe(Collections.singletonList(topic1)); consumer2.subscribe(Collections.singletonList(topic2)); - consumer1.poll(Duration.ofSeconds(5)); - consumer2.poll(Duration.ofSeconds(5)); + consumer1.poll(Duration.ofSeconds(8)); + consumer2.poll(Duration.ofSeconds(8)); // After polling once, only one of the consumers will be member of the group, so we poll again // to force the other consumer to join the group. - consumer1.poll(Duration.ofSeconds(5)); - consumer2.poll(Duration.ofSeconds(5)); + consumer1.poll(Duration.ofSeconds(8)); + consumer2.poll(Duration.ofSeconds(8)); // commit offsets from consuming from subscribed topics consumer1.commitSync(); consumer2.commitSync();