The full suite at f3c4d7b7a went red once on the off case: "agent got
200, upstream asked 1 times; want 429, asked 1". scaled() sets
keepHeldAfter to 20ms, so on a busy machine the upstream's 429 came after
the held stream had already sent its 200 and SSE comments, and the 429
went to the agent inside the stream. The product's keepHeldAfter is 15s;
the off and shorter cases test the user's Patience, not keep-alive, so
they now hold keepHeldAfter at a minute. The longer case (want 200) keeps
the scaled one.
Run:
- with a 60ms sleep injected in busyUpstream.ServeHTTP: off and shorter
red on the old test, exactly CI's message; green with this change.
- without it: -count=20 -run '^TestSingleProviderOwnPatienceWins$'
./internal/gateway ok (11.0s). gofmt clean.
Test-only change; nothing else run for it.