fix(java): Stabilize async consumer group test#3697
Open
ryerraguntla wants to merge 2 commits into
Open
Conversation
Handle transient `IggyResourceNotFoundException` during concurrent join/leave operations in `AsyncConsumerGroupsTest`. This adds bounded retry/backoff helpers and waits for the expected member count before asserting, reducing flakiness from eventually consistent consumer-group state.
|
Thanks for the PR. It is labeled Slash commands (own line, regular comment) move it around the queue:
See CONTRIBUTING.md for details. |
Contributor
Author
|
/ready |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes flakiness in the Java SDK async consumer-group integration test for concurrent join/leave operations. The change adds bounded retry handling for transient not-found errors and waits for the consumer-group membership count to converge before asserting, making the test more stable without changing its intent.
Handle transient
IggyResourceNotFoundExceptionduring concurrent join/leave operations inAsyncConsumerGroupsTest. This adds bounded retry/backoff helpers and waits for the expected member count before asserting, reducing flakiness from eventually consistent consumer-group state.Which issue does this PR address?
Closes # 3641
Relates to # pr=3515
Rationale
To address the flaky java tests.
What changed?
This PR stabilizes a flaky Java SDK integration test covering concurrent consumer-group join and leave operations.
The test previously asserted consumer-group state immediately after concurrent operations completed. In some runs, transient IggyResourceNotFoundException errors or short propagation delays caused intermittent failures even though the underlying behavior was correct.
Changes in this PR
add retry handling around concurrent joinConsumerGroup calls
add retry handling around concurrent leaveConsumerGroup calls
retry only for transient IggyResourceNotFoundException cases
wait until the consumer group reaches the expected member count before asserting
extract shared helper methods for retry and polling behavior
add reusable timeout and backoff constants for transient-state handling
Why
Concurrent async operations can briefly observe unstable or not-yet-visible consumer-group state. This PR makes the test robust to those short-lived conditions while preserving the original behavior being verified.
Impact
improves reliability of the Java SDK integration test suite
reduces intermittent failures in consumer-group concurrency coverage
limits scope to test code only
Reviewer-focused summary
Primary goal: eliminate flaky failures in AsyncConsumerGroupsTest
Approach: add bounded retry logic for transient not-found errors and poll for expected membership state
Scope: test-only change in the Java SDK
Risk: low, since production code is unchanged
Behavioral effect: assertions are now based on eventual stable state rather than immediate visibility after concurrent operations
Local Execution
AI Usage
If AI tools were used, please answer: