From f76308add334ace4b80ce7707bed72ce304a9165 Mon Sep 17 00:00:00 2001 From: clawbot <35+clawbot@noreply.example.org> Date: Wed, 11 Nov 2026 07:31:27 +0100 Subject: [PATCH] rproxy tests: give the 1 MiB answer a 60 s time limit (closes #335) Test only. `TestAnAnswerOf1MiBGoesToTheVisitor` read an answer of 1 MiB from `waf` within the default `SWRP_TIMEOUT_MS` of 2 s. On a busy host that time ran out first, `rproxy` applied `SWRP_DEFAULT_DISPOSITION` as it should, and the test failed. It now sets `SWRP_TIMEOUT_MS` to `60000`, as the file's other tests do where that limit is not what they test. Model: opus-5-5 --- internal/rproxy/rproxy_test.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/rproxy/rproxy_test.go b/internal/rproxy/rproxy_test.go index 3f0a7a9..5b45179 100644 --- a/internal/rproxy/rproxy_test.go +++ b/internal/rproxy/rproxy_test.go @@ -1023,7 +1023,9 @@ func TestAnAnswerOf1MiBGoesToTheVisitor(t *testing.T) { w.WriteHeader(http.StatusInternalServerError) _, _ = w.Write(make([]byte, size)) }) - addr, _ := startRProxy(t, standIn.URL, nowhere, nil) + addr, _ := startRProxy(t, standIn.URL, nowhere, map[string]string{ + timeoutSetting: "60000", + }) got := get(t, addr, "/") if got.status != http.StatusInternalServerError || len(got.body) != size {