mirror of
https://github.com/agent-substrate/substrate.git
synced 2026-11-11 10:23:17 +08:00
I've seen this test flake at least once due to (I think) the way we are truncating the timestamp for the NotBefore checks. Replace all the clock injection stuff with synctest. No failures after 100 runs using `stress`. ``` taahm@taahm1 /u/l/g/h/t/p/s/substrate (deflake-signer)> go test ./cmd/podcertcontroller/... ? github.com/agent-substrate/substrate/cmd/podcertcontroller [no test files] ok github.com/agent-substrate/substrate/cmd/podcertcontroller/internal/podcertificate 0.013s ok github.com/agent-substrate/substrate/cmd/podcertcontroller/internal/podidentitysigner 0.031s ? github.com/agent-substrate/substrate/cmd/podcertcontroller/internal/rendezvous [no test files] ? github.com/agent-substrate/substrate/cmd/podcertcontroller/internal/servicednssigner [no test files] ? github.com/agent-substrate/substrate/cmd/podcertcontroller/internal/signercontroller [no test files] ``` ``` taahm@taahm1 /u/l/g/h/t/p/s/substrate (deflake-signer) [1]> stress -count 100 go test ./cmd/podcertcontroller/... 5s: 24 runs so far, 0 failures, 8 active 10s: 48 runs so far, 0 failures, 8 active 15s: 63 runs so far, 0 failures, 8 active 20s: 78 runs so far, 0 failures, 8 active 25s: 89 runs so far, 0 failures, 8 active 27s: 100 runs total, 0 failures ```