You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "viktorsomogyi (via GitHub)" <gi...@apache.org> on 2026/09/22 14:39:08 UTC
Re: [PR] MINOR: Fix flaky ShortInitializationTimeout tests in DescribeConsumerGroupTest [kafka]
viktorsomogyi commented on code in PR #23470:
URL: https://github.com/apache/kafka/pull/23470#discussion_r4072892297
##########
tools/src/test/java/org/apache/kafka/tools/consumer/group/DescribeConsumerGroupTest.java:
##########
@@ -935,9 +935,9 @@ public void testDescribeGroupWithShortInitializationTimeout(ClusterInstance clus
List<String> cgcArgs = new ArrayList<>(List.of("--bootstrap-server", clusterInstance.bootstrapServers(), "--describe", "--group", group, "--timeout", "1"));
cgcArgs.addAll(describeType);
- // run one consumer in the group consuming from a single-partition topic
- try (AutoCloseable protocolConsumerGroupExecutor = consumerGroupClosable(groupProtocol, group, topic, Map.of());
- ConsumerGroupCommand.ConsumerGroupService service = consumerGroupService(cgcArgs.toArray(new String[0]))
+ // Service before consumer: FindCoordinator must reach the broker before __consumer_offsets is created.
+ try (ConsumerGroupCommand.ConsumerGroupService service = consumerGroupService(cgcArgs.toArray(new String[0]));
+ AutoCloseable protocolConsumerGroupExecutor = consumerGroupClosable(groupProtocol, group, topic, Map.of())
Review Comment:
`consumerGroupService` only creates the admin client but it doesn't run any requests, that is done later in the assert. Meanwhile consumerGroupClosable creates consumers in a separate thread and therefore it still could be possible that the order is swapped. I think we'd need explicit synchronization to make sure that FindCoordinator really happens sooner than the consumers creating their offset topic.
--
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.
To unsubscribe, e-mail: jira-unsubscribe@kafka.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org