test: speed up integration tests with channel notification and parallel execution#828
Merged
Conversation
…el execution - Replace polling loops in TestServer/H3TestServer with mpsc channel notification for instant wakeup on request arrival (wait_for_requests, wait_for_h3_requests) - Remove --test-threads=1 from CI command — all test servers use random ports and HTTP/3 caches are isolated per run, so parallel execution is safe - Reduce artificial delays: DNS AAAA 4s->1s, H3 body 100ms->50ms, H2 accept 250ms->100ms, stalling proxy 5s->3s - Reduce timeouts: run_fetch_once 30s->15s, wait_child 5s->3s, accept_tcp_connection 5s->3s, PartialBodyReplayServer 10s->5s - Update AGENTS.md with parallel safety notes and channel notification docs Full suite wall clock: ~48s -> ~11s (4.4x faster)
ETXTBUSY (errno 26) occurs when trying to exec a file that is still open for writing — a transient condition that can happen when a temp script is written and immediately executed (antivirus scanners, delayed writes). Retry up to 5 times with exponential backoff (10-160ms).
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.
Summary
Replaces polling loops in the integration test infrastructure with
mpscchannel notification, removes the--test-threads=1sequential-execution constraint, and reduces several artificial delays and timeouts. Full suite wall clock went from ~48s → ~11s (4.4× faster).Changes
TestServerandH3TestServernow send a notification per request viampscchannel;wait_for_requests/`wait_for_h3_requestsblock onrecv_timeout` instead of polling every 10ms--test-threads=1from CI command. All test servers bind to127.0.0.1:0(random ports), DNS servers use random UDP ports, and HTTP/3 caches are isolated per process — safe to run in parallelrun_fetch_once30s→15s,wait_child5s→3s (×4 PTY helpers),accept_tcp_connection5s→3s, signal test 5s→3s,PartialBodyReplayServer10s→5sValidation
cargo fmt --checkcleancargo clippy --locked --all-targets --all-features -- -D warningsclean