Keep the sww and rproxy tests from failing on a busy host (closes #420)
check / check (push) Failing after 2m0s
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:
1 parent
dadd5768d5
commit
969f472482
3 files changed
+16
-1
No files matched your search
@@ -52,6 +52,8 @@ func runRProxy(ctx context.Context, env map[string]string, out *output) int {
|
||||
// startRProxy runs rproxy with waf at backend and the app at appURL, and
|
||||
// returns its URL and what it writes. It believes X-Forwarded-For from the
|
||||
// tests. It stops as the test ends, and that it stopped in order is checked.
|
||||
// It waits a minute for waf's answers, so that a busy host cannot make it drop
|
||||
// a question or a report.
|
||||
func startRProxy(t *testing.T, backend, appURL string) (string, *output) {
|
||||
t.Helper()
|
||||
|
||||
@@ -65,6 +67,7 @@ func startRProxy(t *testing.T, backend, appURL string) (string, *output) {
|
||||
"SWW_RPROXY_UPSTREAM_URL": appURL,
|
||||
"SWW_RPROXY_TRUSTED_PROXIES": localhost + "/32",
|
||||
wafBackend: backend,
|
||||
wafBackendTimeout: "60000",
|
||||
}, out)
|
||||
}()
|
||||
|
||||
|
||||
Reference in new issue
Block a user