Keep the sww and rproxy tests from failing on a busy host (closes #420)
check / check (push) Failing after 2m0s

The rproxy tests and the sww tests that run rproxy now wait a minute for
waf's answers unless a test sets SWW_RPROXY_WAF_BACKEND_TIMEOUT_MS. At
the 2-second default, a slow host made rproxy drop questions and
reports.

The sww tests run waf with the Core Rule Set off unless a test sets
SWW_WAF_CORE_RULE_SET_MODE. Under the race detector its inspections
could pass waf's 500 ms limit for its checks, and waf answered 503. The
waf package's tests cover the Core Rule Set.

Model: opus-5-5
This commit is contained in:
sneak committed 2026-11-19 08:48:10 +00:00
1 parent dadd5768d5
commit 969f472482
3 files changed
+16 -1

No files matched your search

+3 -1
View File
@@ -324,7 +324,8 @@ func greet(w http.ResponseWriter, r *http.Request) {
// startRProxy starts rproxy with waf at backend and the app at appURL, and
// the settings in env on top of the defaults. It returns where rproxy listens
// and what it writes.
// and what it writes. SWW_RPROXY_WAF_BACKEND_TIMEOUT_MS is a minute unless env
// sets it, so that a busy host cannot make rproxy drop a question or a report.
func startRProxy(
t *testing.T, backend, appURL string, env map[string]string,
) (string, *output) {
@@ -357,6 +358,7 @@ func startServerLogging(
settings := map[string]string{
"SWW_RPROXY_WAF_BACKEND": backend, "SWW_RPROXY_UPSTREAM_URL": appURL,
wafBackendTimeout: "60000",
}
maps.Copy(settings, env)