Skip to content

test(login_flow): make the local-server integration test deterministic - #176

Merged
gnacho merged 1 commit into
mainfrom
fix/174-login-flow-flaky
Aug 23, 2026
Merged

gnacho merged 1 commit into
mainfrom
fix/174-login-flow-flaky

Conversation

@gnacho

@gnacho gnacho commented Aug 23, 2026

Copy link
Copy Markdown
Owner

Fixes #174.

The test server did two sequential recv() assuming the initiate landed before the poll. ureq can reuse a keep-alive connection and tiny_http serves multi-threaded, so request order is not guaranteed and the poll occasionally hit the wrong slot producing PollHttp 400 (flaky ~1/143).

Now the server answers each request by URL (initiate vs /poll), independent of order or connection reuse.

Verified 300/300 passes (was ~1/143 before).

The test server did two sequential recv() assuming the initiate request
landed before the poll. The client (ureq) can reuse a keep-alive connection
and tiny_http serves multi-threaded, so the request order is not guaranteed
and the poll occasionally got the wrong slot -> PollHttp 400 (flaky ~1/143).

Answer each request by its URL (initiate vs /poll) so the test no longer
depends on request order or connection reuse. Verified 300/300 passes (was
~1/143 before).

Closes #174
@gnacho
gnacho merged commit d91e0c4 into main Aug 23, 2026
1 check passed
@gnacho
gnacho deleted the fix/174-login-flow-flaky branch August 23, 2026 17:35
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 login_flow integration test shows PollHttp 400 sporadically

1 participant