Keep the sww and rproxy tests from failing on a busy host (closes #420)
check / check (push) Failing after 2m12s
check / check (push) Failing after 2m12s
The rproxy package's tests and sww's startRProxyProcess give rproxy 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. TestMainRunsWAF runs waf with the Core Rule Set off. Main keeps waf's 500 ms limit for its checks, and under the race detector the Core Rule Set's inspection could pass it and get 503. Model: opus-5-5
This commit was merged in pull request #423.
This commit is contained in:
1 parent
eb48796f27
commit
5099448f79
3 files changed
+12
-4
No files matched your search
@@ -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)
|
||||
|
||||
|
||||
Reference in new issue
Block a user