sww: lift waf's check time limit and rproxy's wait in tests (closes #418)
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
此提交已合并在合并请求 #422 中。
这个提交包含在:
clawbot 于 2026-11-19 10:44:53 +01:00 提交
1 父节点 48edab5dad
当前提交 9cb8f362bc
7 个文件已更改
+33 -22

没有与搜索条件相匹配的文件

-9
查看文件
@@ -1,13 +1,4 @@
package waf
import "time"
// BesideLookupTimeLimit is besideLookupTimeLimit.
const BesideLookupTimeLimit = besideLookupTimeLimit
// SetBesideLookupTimeLimit gives the heuristics of besideLookup limit on s in
// place of besideLookupTimeLimit.
func (s *Server) SetBesideLookupTimeLimit(limit time.Duration) {
h := s.Handler.(*handler) //nolint:forcetypeassert // New makes it one
h.besideLookupLimit = limit
}