Repository navigation
Http2ConnectionRoundtripTest: Reduce timing sensitivity to fix CI flakiness (#17540) - #17552
Merged
Merged
Conversation
…kiness (#17540) Motivation: We saw sporadic CI failures in Http2ConnectionRoundtripTest where a CountDownLatch.await(...) timed out even though the connection was behaving correctly. Each test method spins up two MultiThreadIoEventLoopGroups with the default thread count (2 * available processors), even though the test only exercises LocalChannel and never needs more than one thread per group. Combined with this module running JUnit5 tests concurrently, this can create significant thread oversubscription and starve the event loop long enough to blow the 15 second timeout under load. This was reproduced locally by running many instances of the test concurrently while the machine was under heavy CPU load, which reliably reproduced the same kind of timeout failure seen on CI. Modifications: - Pin the client and server MultiThreadIoEventLoopGroups in bootstrapEnv(...) to a single thread each instead of the default, since LocalChannel does not benefit from extra threads. - Increase DEFAULT_AWAIT_TIMEOUT_SECONDS from 15 to 30 seconds to give more headroom under CI load. Result: Less flaky Http2ConnectionRoundtripTest.
✅ All tests passed ✅🏷️ Commit: 7dd96c0 Learn more about TestLens at testlens.app/docs. |
lltopk
pushed a commit
to lltopk/netty
that referenced
this pull request
Oct 24, 2026
…kiness (netty#17540) (netty#17552) Motivation: We saw sporadic CI failures in Http2ConnectionRoundtripTest where a CountDownLatch.await(...) timed out even though the connection was behaving correctly. Each test method spins up two MultiThreadIoEventLoopGroups with the default thread count (2 * available processors), even though the test only exercises LocalChannel and never needs more than one thread per group. Combined with this module running JUnit5 tests concurrently, this can create significant thread oversubscription and starve the event loop long enough to blow the 15 second timeout under load. This was reproduced locally by running many instances of the test concurrently while the machine was under heavy CPU load, which reliably reproduced the same kind of timeout failure seen on CI. Modifications: - Pin the client and server MultiThreadIoEventLoopGroups in bootstrapEnv(...) to a single thread each instead of the default, since LocalChannel does not benefit from extra threads. - Increase DEFAULT_AWAIT_TIMEOUT_SECONDS from 15 to 30 seconds to give more headroom under CI load. Result: Less flaky Http2ConnectionRoundtripTest.
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.
Motivation:
We saw sporadic CI failures in Http2ConnectionRoundtripTest where a
CountDownLatch.await(...) timed out even though the connection was
behaving correctly. Each test method spins up two
MultiThreadIoEventLoopGroups with the default thread count
(2 * available processors), even though the test only exercises
LocalChannel and never needs more than one thread per group. Combined
with this module running JUnit5 tests concurrently, this can create
significant thread oversubscription and starve the event loop long
enough to blow the 15 second timeout under load. This was reproduced
locally by running many instances of the test concurrently while the
machine was under heavy CPU load, which reliably reproduced the same
kind of timeout failure seen on CI.
Modifications:
bootstrapEnv(...) to a single thread each instead of the default,
since LocalChannel does not benefit from extra threads.
more headroom under CI load.
Result:
Less flaky Http2ConnectionRoundtripTest.