sww: keep the stop cut-off test within funlen's 80 lines
check / check (push) Waiting to run

On next, TestRProxyStoppingCutsOffARequestAfterFiveSeconds is at the
limit, and this PR's reformatting of the stand-in's answer adds a line,
so the linter fails on the merged tree. The test now uses the file's
rproxyUpstreamURL instead of declaring the same setting name again.

Model: opus-5-5
This commit is contained in:
sneak committed 2026-11-19 19:17:50 +00:00
1 parent 73e0137c07
commit 9ff9f23a8f
1 file changed
+4 -7
+4 -7
View File
@@ -787,10 +787,7 @@ func sendAndKeepOpen(t *testing.T, addr, request string) net.Conn {
func TestRProxyStoppingCutsOffARequestAfterFiveSeconds(t *testing.T) {
t.Parallel()
const (
cutOffAfter = 5 * time.Second
upstreamSetting = "SWW_RPROXY_UPSTREAM_URL"
)
const cutOffAfter = 5 * time.Second
asked := make(chan struct{})
release := make(chan struct{})
@@ -813,9 +810,9 @@ func TestRProxyStoppingCutsOffARequestAfterFiveSeconds(t *testing.T) {
defer stop()
env := map[string]string{
rproxyListenAddr: localhost + ":0",
upstreamSetting: app.URL,
wafBackend: backend.URL,
rproxyListenAddr: localhost + ":0",
rproxyUpstreamURL: app.URL,
wafBackend: backend.URL,
}
out := &output{}
exited := make(chan int, 1)