--- FAIL: TestRotator (60.10s)
--- FAIL: TestRotator/reattest_expires_after_startup (60.02s)
rotator_test.go:211: timed out waiting for rotation check to finish
FAIL
FAIL github.com/spiffe/spire/pkg/agent/svid 60.267s
For the "reattest expires after startup" test case, we advance the clock two minutes. But since the rotator is launched in a separated go routine, that may happen before the rotator is running.
Added a hook to make sure that we advance the clock after the rotator is running.
There is a race condition in the TestRotator test that can make it to fail: https://github.com/spiffe/spire/actions/runs/11742647891/job/32713865973?pr=5642
For the "reattest expires after startup" test case, we advance the clock two minutes. But since the rotator is launched in a separated go routine, that may happen before the rotator is running. Added a hook to make sure that we advance the clock after the rotator is running.