mirror of
https://github.com/agent-substrate/substrate.git
synced 2026-11-11 10:23:17 +08:00
The startup registered-worker scan read its backoff from a package-level var that tests overwrote. Syncers started by earlier tests outlive them and keep reading that var, so the write races the read and `go test -race` fails, in whichever test happens to do the write. Hold the schedule on the syncer instead, so a test only ever shrinks the backoff of the syncer it owns. Fixes a flake I encountered on one of my other PRs. I didn't see an open issue or fix but this is pretty straightforward.