Skip to content

KAFKA-21051: testShareConsumerAfterCoordinatorMovement can halt the test JVM - #23440

Open
Russole wants to merge 1 commit into
apache:trunkfrom
Russole:KAFKA-21051-testShareConsumerAfterCoordinatorMovement-can-halt-the-test-JVM
Open

KAFKA-21051: testShareConsumerAfterCoordinatorMovement can halt the test JVM#23440
Russole wants to merge 1 commit into
apache:trunkfrom
Russole:KAFKA-21051-testShareConsumerAfterCoordinatorMovement-can-halt-the-test-JVM

Conversation

@Russole

@Russole Russole commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

This PR fixes a race in testShareConsumerAfterCoordinatorMovement
where an empty poll could stop the consumer before all produced records
were consumed. It separates the producer stop request from actual
completion, waits for all produced keys, and ensures asynchronous tasks
finish before cleanup.

The issue was reproduced by temporarily scheduling coordinator movement
at 8 seconds. The original test failed frequently, while the fixed test
passed all repeated runs under the same timing.

Test

./gradlew clients:clients-integration-tests:test \
  --tests
org.apache.kafka.clients.consumer.ShareConsumerTest.testShareConsumerAfterCoordinatorMovement
\
  -Pkafka.cluster.test.repeat=5 \
  --rerun-tasks

@github-actions github-actions Bot added triage PRs from the community tests Test fixes (including flaky tests) clients small Small PRs labels Sep 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clients small Small PRs tests Test fixes (including flaky tests) triage PRs from the community

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant