TestGatewayHookSlowRecallUsesConfiguredBudget polls every 50ms for the
file its onResponse writes and fails on the first read that succeeds.
fs.writeFileSync creates the file empty before it writes the bytes, so a
read in between saw "" and failed with `captured ` (mote at f03ec97b8,
and macOS CI run 43664046438 at 01f307091). The fixture now writes a
.tmp beside it and renames it in, so the file appears whole or not at
all. The budgets under test were never the cause: 24.16s is the 12s
recall plus the 12s onResponse.
Run:
- Broken by hand: the fixture opening the file, waiting 300ms, then
writing goes red the way CI did (`gateway_budget_test.go:53: captured `).
- The fix: -count=3 -run '^TestGatewayHookSlowRecallUsesConfiguredBudget$'
ok on mote (load 26 on 18 cores at the time), and the whole
internal/plugin package ok on mica (179s), with go vet and gofmt -l
clean.
Not run: the full suite; this changes one test's JS fixture only.
Closes#6019.