diff --git a/internal/sww/rproxy_test.go b/internal/sww/rproxy_test.go index 49b8de1..c0cbc5f 100644 --- a/internal/sww/rproxy_test.go +++ b/internal/sww/rproxy_test.go @@ -552,7 +552,9 @@ func TestAStatusWAFDoesNotTakeIsReportedAs599(t *testing.T) { // startRProxyProcess runs `sww rproxy` in a process of its own, with the // settings in env, each as NAME=value. It returns where rproxy listens and a // function that sends rproxy SIGTERM and fails the test unless it exits with -// status 0 within waitLimit. +// status 0 within waitLimit. It waits a minute for waf's answers unless env +// sets SWW_RPROXY_WAF_BACKEND_TIMEOUT_MS, so that a busy host cannot make it +// drop a question. func startRProxyProcess(t *testing.T, env ...string) (string, func()) { t.Helper() @@ -568,7 +570,8 @@ func startRProxyProcess(t *testing.T, env ...string) (string, func()) { cmd.Env = append(os.Environ(), commandForMain+"=rproxy", - "SWW_RPROXY_LISTEN_ADDR="+localhost+":0") + "SWW_RPROXY_LISTEN_ADDR="+localhost+":0", + wafBackendTimeout+"=60000") cmd.Env = append(cmd.Env, env...) exited := startProcess(t, cmd)