This is an automated email from the ASF dual-hosted git repository.

vahid pushed a commit to branch 2.2
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/2.2 by this push:
     new b56f069  KAFKA-7937: Fix Flaky Test 
ResetConsumerGroupOffsetTest.testResetOffsetsNotExistingGroup (#6311)
b56f069 is described below

commit b56f069184ffd15b40f997e86bd089ccf4645e80
Author: Gwen (Chen) Shapira <csh...@gmail.com>
AuthorDate: Sat Feb 23 08:41:03 2019 -0800

    KAFKA-7937: Fix Flaky Test 
ResetConsumerGroupOffsetTest.testResetOffsetsNotExistingGroup (#6311)
    
    (cherry picked from commit 0150dbc1d0ad052664054d17826348c2eb1eefaf)
---
 .../test/scala/unit/kafka/admin/ResetConsumerGroupOffsetTest.scala    | 4 ++++
 1 file changed, 4 insertions(+)

diff --git 
a/core/src/test/scala/unit/kafka/admin/ResetConsumerGroupOffsetTest.scala 
b/core/src/test/scala/unit/kafka/admin/ResetConsumerGroupOffsetTest.scala
index eaa0c85..007edd9 100644
--- a/core/src/test/scala/unit/kafka/admin/ResetConsumerGroupOffsetTest.scala
+++ b/core/src/test/scala/unit/kafka/admin/ResetConsumerGroupOffsetTest.scala
@@ -86,6 +86,10 @@ class ResetConsumerGroupOffsetTest extends 
ConsumerGroupCommandTest {
     val args = Array("--bootstrap-server", brokerList, "--reset-offsets", 
"--group", "missing.group", "--all-topics",
       "--to-current", "--execute")
     val consumerGroupCommand = getConsumerGroupService(args)
+    // Make sure we got a coordinator
+    TestUtils.waitUntilTrue(() => {
+      consumerGroupCommand.collectGroupState().coordinator.host() == 
"localhost"
+    }, "Can't find a coordinator.", maxRetries = 3)
     val resetOffsets = consumerGroupCommand.resetOffsets()
     assertEquals(Map.empty, resetOffsets)
     assertEquals(resetOffsets, committedOffsets(group = "missing.group"))

Reply via email to