test(shutdown): wait for the handler to start instead of 100 ms #356

Merged
sharang merged 1 commits from fix/shutdown-test-race into main 2026-09-23 15:46:49 +00:00
1 Commits
Author SHA1 Message Date
Sharang ParnerkarandClaude Opus 5.5 264a789049 test(shutdown): wait for the handler to start instead of 100 ms
CI / Check (push) Skipped
CI / Detect Changes (pull_request) Skipped
CI / Deploy Agent (pull_request) Skipped
CI / Deploy Dashboard (pull_request) Skipped
CI / Deploy Docs (pull_request) Skipped
CI / Deploy MCP (pull_request) Skipped
CI / Check (pull_request) Successful in 7m54s
in_flight_request_finishes_after_shutdown_fires failed twice on CI (#350,
#352) with hyper's IncompleteMessage. It fired shutdown a fixed 100 ms
after sending the request. On a busy runner the connection could be
accepted before its request was read; graceful shutdown rightly closes
such an idle connection, and the test failed although no in-flight
request was dropped.

The handler now signals when it has started, and shutdown fires only
then, so the test checks what its name says: a request being handled
finishes during the drain.

Verified: 40 runs, four at a time, all pass.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYKjxacrr6K88DruUmP48p
2026-09-23 17:35:50 +02:00