KAFKA-16245: Improve reliability of short initialization timeout tests - #23230
Conversation
m1a2st
left a comment
There was a problem hiding this comment.
Thanks for this patch. I have two minor comments. We can address these in a follow-up patch as well.
-
The rationale here seems to be that both group protocols produce identical assertions. If so, it might be worth applying the same cleanup to some of the other tests in this file as well.
-
Unrelated to this PR, but I noticed that
testDescribeSimpleConsumerGroupiterates over the supported group protocols while always creating the consumer withCLASSIC. As a result, on a cluster that supports both protocols, the exact same CLASSIC-only scenario is executed twice, differing only in the topic and group names.
Thanks for reviewing the PR.
|
The
DescribeConsumerGroupTest.test...WithShortInitializationTimeouttests are flaky. They have an inherent race condition, which generally
works. However, they rely on admin client calls timing out before the
consumer offsets topic has auto-created. Prior to this PR, the test
cases internally iterated over the CONSUMER and CLASSIC group types, and
tried to get both group protocols to fail with a timeout before the
topic had initialized. Occasionally this race was lost and the test
failed.
I considered using a fresh cluster for each group type and running the
tests twice. However, it seems that there's little benefit testing two
group types, so I just changed the tests to use the CONSUMER group type
only.
Reviewers: Ken Huang s7133700@gmail.com