sww: lift waf's check time limit and rproxy's wait in tests (closes #418)
check / check (push) Failing after 1m52s
check / check (push) Failing after 1m52s
Under heavy host load the sww tests got 503 where they expected 200 or 403: waf refused requests whose trap paths, rule files and Core Rule Set took longer than 500 ms, and rproxy gave up on waf after 2 s. waf.Params and sww.Params gain BesideLookupTimeLimit; zero keeps the 500 ms limit, so the binary is unchanged. The sww tests' run gives waf an hour, and startRProxy sets SWW_RPROXY_WAF_BACKEND_TIMEOUT_MS to 60000, as the rproxy package's tests do. waf's own tests set the limit through the new field instead of SetBesideLookupTimeLimit, which is gone. Model: opus-5-5
This commit was merged in pull request #422.
This commit is contained in:
1 parent
48edab5dad
commit
9cb8f362bc
7 files changed
+33
-22
No files matched your search
@@ -51,7 +51,9 @@ 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.
|
||||
// tests. It waits a minute for waf's answer, so that a slow answer on a busy
|
||||
// host is not taken for no answer. It stops as the test ends, and that it
|
||||
// stopped in order is checked.
|
||||
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