From 2284398c81b0c7ff44f7fa0fa7195301b37400a5 Mon Sep 17 00:00:00 2001 From: sneak Date: Thu, 19 Nov 2026 18:45:49 +0000 Subject: [PATCH] rproxy tests: leave room for a busy host in the 408 test TestAVisitorTooSlowToSendTheRestIsAnswered408 still used a 3-second request time limit. Under load, rproxy had not yet started waiting for the rest of the body when it ran out, and answered 504 instead of 408, as reported on the issue. It now uses 5 seconds, like the other time-limit tests in this PR. Model: opus-5-5 --- internal/rproxy/limits_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/internal/rproxy/limits_test.go b/internal/rproxy/limits_test.go index bc0f68e..1d96bf0 100644 --- a/internal/rproxy/limits_test.go +++ b/internal/rproxy/limits_test.go @@ -870,10 +870,14 @@ func TestAnAnswerRProxyGivesItselfHasTenSecondsToBeSentAtLeast( func TestAVisitorTooSlowToSendTheRestIsAnswered408(t *testing.T) { t.Parallel() + // rproxy is waiting for the rest of the body well within this limit, even on + // a busy host, and answers when it runs out, well before dial's deadline. + const limit = 5 * time.Second + standIn := startWAF(t, allow) app := startApp(t, greet) addr, _ := startRProxy(t, standIn.URL, app.URL, map[string]string{ - maxRequestTime: "3000", + maxRequestTime: strconv.FormatInt(limit.Milliseconds(), 10), }) conn := dial(t, addr)