From 45678d9419f2245068766b716a1e7291880204e6 Mon Sep 17 00:00:00 2001 From: stabey <36232531+stabey@users.noreply.github.com> Date: Mon, 28 Sep 2026 11:44:05 +0800 Subject: [PATCH] test(gateway): decouple first-request deadline test from hyper header timeout The partial-preface test raced a 5ms first-request deadline against a 10ms hyper header_read_timeout. On a slow runner both timers expire before the next poll and tokio::select! may pick the connection branch, surfacing hyper's header-timeout error instead of the clean deadline close. Push hyper's timeout out to 30s so only the deadline can fire. Co-Authored-By: Claude Opus 5.5 (1M context) --- apps/aether-gateway/src/main.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/apps/aether-gateway/src/main.rs b/apps/aether-gateway/src/main.rs index 022f53bb6..c130fb53b 100644 --- a/apps/aether-gateway/src/main.rs +++ b/apps/aether-gateway/src/main.rs @@ -4977,7 +4977,11 @@ mod tests { builder .http1() .timer(TokioTimer::new()) - .header_read_timeout(std::time::Duration::from_millis(10)) + // Keep hyper's own header timeout far from the 5ms first-request + // deadline: when a slow runner lets both expire before the next + // poll, `select!` may pick the connection branch and surface + // hyper's header-timeout error instead of the clean deadline close. + .header_read_timeout(std::time::Duration::from_secs(30)) .max_buf_size(super::MIN_GATEWAY_HTTP_HEADER_MAX_BYTES) .max_headers(super::MIN_GATEWAY_HTTP_MAX_HEADERS); builder