From cf7177942b097e86a974d81dd3354c7c33614c9a Mon Sep 17 00:00:00 2001 From: sneak Date: Wed, 11 Nov 2026 05:58:12 +0000 Subject: [PATCH] rproxy tests: give the 1 MiB answer a 60 s time limit (closes #335) Test only. `TestAnAnswerOf1MiBGoesToTheVisitor` left `SWRP_TIMEOUT_MS` at 2 s. On a loaded host `rproxy` could apply `SWRP_DEFAULT_DISPOSITION` before it had read the whole answer, 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 { -- 2.54.0