mirror of
https://github.com/fawney19/Aether.git
synced 2026-10-03 16:07:46 +08:00
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) <[email protected]>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
d30268f80f
commit
45678d9419
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user