-
Notifications
You must be signed in to change notification settings - Fork 9.3k
Add flake detector #9246
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
Draft
yschimke
wants to merge
32
commits into
square:master
Choose a base branch
from
yschimke:flake_skill
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Add flake detector #9246
Conversation
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
To automate identification of CI flakes - Adds a script to analyze GitHub Actions logs for build.yml. - Extracts and aggregates failure counts per test class. - Includes documentation of currently known flaky tests as of Jan 2026.
- Implement reproduce-flakes.sh for local testing of identified flakes. - Modify identify-flakes.sh to output clean test names. - Update SKILL.md with reproduction instructions. - Apply @RepeatedTest(100) to known flaky tests in codebase. - Optimize reproduce-flakes.sh for faster test discovery. - Fix RouteFailureTest by adding takeRequest() to address flaky assertion.
Added a sleep to avoid flaky race conditions in the test.
…pTest - HttpOverHttp2Test: Add sleep to ensure cancellation propagates before checking connection reuse. - Http2ConnectionTest: Add synchronization to WindowCounter visibility. - WebSocketHttpTest: Assert failure to ensure connection close cleanup. - Revert @RepeatedTest to @test.
# Conflicts: # okhttp/src/jvmTest/kotlin/okhttp3/internal/http2/HttpOverHttp2Test.kt
The test was deadlocking because request headers were buffered but not flushed, causing the client to block waiting for a response that the server wouldn't send until it received headers. Added http2Connection.flush() in Http2ExchangeCodec.writeRequestHeaders to ensure headers are sent immediately.
- Make EventListenerRelay thread-safe using AtomicInteger for event counting. This prevents race conditions when events happen concurrently (e.g. Cancel and CallFailed). - Revert @RepeatedTest to @test for cancelAsyncCall and successfulCallEventSequenceForEnqueue.
These tests were likely repeated to verify recent fixes, but should be standard tests in the main branch.
- Revert @RepeatedTest to @test in DuplexTest, EventListenerTest, Http2ConnectionTest, HttpOverHttp2Test, WebSocketHttpTest. - Increase sleep in HttpOverHttp2Test.recoverFromMultipleCancelReusesConnection to 500ms to be robust in CI.
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.
To automate identification of CI flakes