Skip to content

test: the starved-pool tests no longer depend on timing - #108

Merged
AlxcBTW merged 2 commits into
mainfrom
night/pool-test
Oct 28, 2026
Merged

AlxcBTW merged 2 commits into
mainfrom
night/pool-test

Conversation

@AlxcBTW

@AlxcBTW AlxcBTW commented Oct 27, 2026 •

Copy link
Copy Markdown
Member

The flake: a_starved_pool_answers_429_with_retry_after_within_the_acquire_timeout failed on Windows with left: 429, right: 200 from Reply::ok(200), not from the assertion about the starved pool. The test builds a cloud with a two-connection pool and a 500 ms acquire timeout and then signs up through the API. On a slow runner the cloud's own background work (sweep, heartbeat) holds a connection while the sign-up needs one, so the sign-up itself was answered 429. The earlier fix (#103) only made the check after the release patient.

Now every test of this file does its setup patiently (until_served asks again while the answer is 429, sign_up uses it) and hold takes the whole pool, waiting for the background work to give connections back. From then on the pool is empty by the test's own doing. All assertions are unchanged (429 with rate_limited, Retry-After of 1 to 2 s, timing bounds, 503 for the request timeout, the shed and health tests).


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.

@AlxcBTW
AlxcBTW merged commit 802e37d into main Oct 28, 2026
9 checks passed
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.

1 participant