Skip to content

Fix flaky ReadBufferLimitTest/SomeLimit test #40206

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tedjpoole
Copy link
Contributor

Fix flaky ReadBufferLimitTest/SomeLimit test

The ReadBufferLimitTest/SomeLimit test intermittently fails on some dev machines due to the unpredictable behaviour of readv() calls which occasionally don't fill the buffers provided to it i.e. not enough data available to read from the socket. When this happens, the test fails because there is an incorrect (off by 1) assertion on the maximum chunk size that the server side ReadFilter should see.

This PR adds a new short_readv parameter to the test. If this parameter is zero, the test behaves as before, but it it is non-zero then the test mocks the necessary system calls in order to deterministically emulate the scenario where readv() doesn't manage to fill the buffers provided to it.

Fixes #40147

Signed-off-by: Ted Poole <tpoole@redhat.com>
@tedjpoole tedjpoole force-pushed the flakey-read-buffer-limit-test branch from 721a8b7 to 2393b30 Compare July 11, 2025 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flaky IpVersions/ReadBufferLimitTest.SomeLimit/* test
1 participant