test(app): make the secret rotation coalescing test deterministic
Merged
SA
19h ago+36+36+01234567890123456789-9-9-0123456789
TestSecretRotationWatchesNotifications asserted that 50 notifications coalesce into at most two checks, but the watcher ran checks while the loop was still sending. A fast check could finish and pick up a later notification, so three or more checks were possible (failed on #1607 with "3" is not less than or equal to "2").
The test now holds the first check until all notifications are sent, which is the situation the bound describes. Test-only change.
Summary by CodeRabbit
- Tests
- Expanded coverage for secret-rotation notifications received while a planning check is in progress, including confirmation that a coalesced pending notification triggers a follow-up reload.
- Added time-bounded checks to confirm the planning check starts and both reloads complete.
- Verified the final planning count is exactly two after the watcher closes.
- No user-facing behavior changed.