You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Follow-up from #2034 review: cover configured busy timeout in SpeakerDatabaseSnapshotTests #2145
Already fixed on main by 78d7a18 ("Prove snapshot busy timeout with an injected clock", landed via #2173).
SpeakerDatabaseSnapshot.create now takes injected now/wait closures, and testExclusiveLockFailsWithBusyAndPreservesSource passes busyTimeout: 0.05 with a fake monotonic clock. It asserts the simulated time ends at 0.05 (±1e-6), exactly 5 waits each in (0, 0.01], a .busy error, unchanged source bytes, and no destination file. No wall-clock timing.
Checked on current origin/main:
swift test --filter SpeakerDatabaseSnapshotTests in Tools/TranscriptedCLI: 7 tests, 0 failures.
Mutation check: forcing the deadline to the fixed 5s cap (ignoring busyTimeout) makes the test fail (simulated time 5.0 vs 0.05, 501 waits vs 5). Reverted after.
So the promise from the #2034 review thread is covered. Closing.
Activity
r3dbars commentedon Oct 17, 2026
Already fixed on main by 78d7a18 ("Prove snapshot busy timeout with an injected clock", landed via #2173).
SpeakerDatabaseSnapshot.createnow takes injectednow/waitclosures, andtestExclusiveLockFailsWithBusyAndPreservesSourcepassesbusyTimeout: 0.05with a fake monotonic clock. It asserts the simulated time ends at 0.05 (±1e-6), exactly 5 waits each in (0, 0.01], a.busyerror, unchanged source bytes, and no destination file. No wall-clock timing.Checked on current origin/main:
swift test --filter SpeakerDatabaseSnapshotTestsin Tools/TranscriptedCLI: 7 tests, 0 failures.busyTimeout) makes the test fail (simulated time 5.0 vs 0.05, 501 waits vs 5). Reverted after.So the promise from the #2034 review thread is covered. Closing.