You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "bkurdi97 (via GitHub)" <gi...@apache.org> on 2026/09/15 10:19:34 UTC

[PR] Fix flaky ShortInitializationTimeout tests in DescribeConsumerGroupTest [kafka]

bkurdi97 opened a new pull request, #23469:
URL: https://github.com/apache/kafka/pull/23469

   The four ShortInitializationTimeout tests were flaky because the try-with-resources initialised consumerGroupClosable (starting the consumer background thread) before consumerGroupService (creating the Admin client). During that gap the consumer could race ahead and complete __consumer_offsets creation, so by the time describeGroups / collectGroup* was called the coordinator was already live and responded in < 1 ms — no timeout, assertion fails.
   
   Fix: swap the resource order so the Admin client is ready before the consumer thread starts, ensuring FindCoordinator is dispatched while __consumer_offsets is still being created.
   
   Also remove the duplicate assertThrows in
   testDescribeGroupMembersWithShortInitializationTimeout: the first call takes ~100 ms to time out (retry backoff), during which the consumer fully initialises the group. A second call then finds a stable coordinator and does not throw, making the second assertion inherently flaky.


-- 
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


Re: [PR] Fix flaky ShortInitializationTimeout tests in DescribeConsumerGroupTest [kafka]

Posted by "bkurdi97 (via GitHub)" <gi...@apache.org>.
bkurdi97 closed pull request #23469: Fix flaky ShortInitializationTimeout tests in DescribeConsumerGroupTest
URL: https://github.com/apache/kafka/pull/23469


-- 
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