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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to