This is an automated email from the ASF dual-hosted git repository. vahid pushed a commit to branch trunk in repository https://gitbox.apache.org/repos/asf/kafka.git
The following commit(s) were added to refs/heads/trunk by this push: new 0150dbc KAFKA-7937: Fix Flaky Test ResetConsumerGroupOffsetTest.testResetOffsetsNotExistingGroup (#6311) 0150dbc is described below commit 0150dbc1d0ad052664054d17826348c2eb1eefaf Author: Gwen (Chen) Shapira <csh...@gmail.com> AuthorDate: Sat Feb 23 08:41:03 2019 -0800 KAFKA-7937: Fix Flaky Test ResetConsumerGroupOffsetTest.testResetOffsetsNotExistingGroup (#6311) --- .../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"))