rproxy tests: give the over-1 MiB answers a 60 s time limit (closes #323)
check / check (push) Waiting to run

TestAnAnswerThatCannotBePassedOnIsAnswered502 and
TestAnAnswerThatCannotBePassedOnGetsNoReport left SWRP_TIMEOUT_MS at its
default of 2 s. On a loaded host rproxy had not read the whole answer of
1 MiB and one byte within that time, so it used SWRP_DEFAULT_DISPOSITION
and the tests, which want 502, failed. Both now set SWRP_TIMEOUT_MS to
60000, as the file's other tests do where the time limit is not what they
test.

Model: opus-5-5
This commit is contained in:
sneak committed 2026-11-11 04:39:44 +00:00
1 parent f7e3190654
commit 931b8e11f8
1 file changed
+4 -1
+4 -1
View File
@@ -1117,6 +1117,7 @@ func TestAnAnswerThatCannotBePassedOnIsAnswered502(t *testing.T) {
t.Error("the app was asked")
})
addr, out := startRProxy(t, backend(t), app.URL, map[string]string{
timeoutSetting: "60000",
defaultDisposition: setting,
})
@@ -1140,7 +1141,9 @@ func TestAnAnswerThatCannotBePassedOnGetsNoReport(t *testing.T) {
t.Parallel()
standIn := startWAF(t, overOneMiB(dispositionDeny))
addr, out := startRProxy(t, standIn.URL, nowhere, nil)
addr, out := startRProxy(t, standIn.URL, nowhere, map[string]string{
timeoutSetting: "60000",
})
if got := get(t, addr, "/"); got.status != http.StatusBadGateway {
t.Errorf("answered %+v, want 502", got)