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
fix(screentracker): fix context-cancellation test race with mock clock
The test had a race: advanceFor could complete before the Send()
goroutine enqueued, so the stableSignal never fired, and sendCancel
ran while the message was still queued (never reaching writeStabilize).
Fix: use onWrite callback as a synchronization point. advanceUntil
waits for writeStabilize to start writing (onWrite fires), then
cancels. This guarantees Phase 1 WaitFor is running when ctx is
cancelled, and its sleep select sees ctx.Done() immediately.
0 commit comments