Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KAFKA-17554: Flaky testFutureCompletionOutsidePoll in ConsumerNetworkClientTest #18298

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from

Conversation

m1a2st
Copy link
Contributor

@m1a2st m1a2st commented Dec 22, 2024

Jira: https://issues.apache.org/jira/browse/KAFKA-17554

In the previous workflow, the test passes under two conditions:

  1. The t1 thread is waiting for the main thread's client.wakeup(). If successful, t1 will wake up t2, allowing t2 to complete the future.
  2. If t1 fails to receive the client.wakeup() from the main thread, t2 will be woken up by the main thread.

In the previous implementation, we used a CountDownLatch to control the execution of three threads, but it often led to race conditions. Currently, we have modified it to use two threads to test this scenario.

I run I=0; while ./gradlew :clients:test --tests ConsumerNetworkClientTest.testFutureCompletionOutsidePoll --rerun --fail-fast; do (( I=$I+1 )); echo "Completed run: $I"; sleep 1; done and pass 3000+ times.
image

Committer Checklist (excluded from commit message)

  • Verify design and implementation
  • Verify test coverage and CI build status
  • Verify documentation (including upgrade notes)

@github-actions github-actions bot added triage PRs from the community consumer tests Test fixes (including flaky tests) clients small Small PRs labels Dec 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clients consumer 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