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
playOut leaves slow work running, and the test reads what it still writes #182
TestDispatch_WithAPriority failed with a data race in CI on ubuntu under -race (#179, a branch that changes no Go code): the test read fakeEditor.seen and opened (internal/ui/edit_test.go:42) while the edit command still wrote them in a goroutine playOut started (internal/ui/writes_test.go:148), and the dispatch after the edit never ran.
playOut tells a command that waits on a stream from slow work by time: a command that has not answered lateAnswer (100 ms) after it started is left running when the rest is done. On a slow runner under the race detector, the fake editor (a file read and write) took longer than that, so playOut returned with it running. Any test whose last command is slow work can fail the same way.
Timers are already told apart without time (timersHeld, startTimer). Only three places in internal/ui wait on a stream inside a command: feed.go (events), logs.go (log lines) and watch.go (changes). A fix: playOut knows which running commands wait on a stream, and waits for every other command until it answers (with a bound that fails the test instead of hanging), so no test reads what a command still writes. A guard test keeps every stream wait in the known places, the way TestTimers_StartInOnePlace does for timers.
Activity