summaryrefslogtreecommitdiff
path: root/internal/runtime
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-05-13 14:35:27 +0300
committerPaul Buetow <paul@buetow.org>2026-05-13 14:35:27 +0300
commit306b9eb1c1054992506dd36fc9f1b64e11276598 (patch)
tree51cb6690961e64035bf85e95c212fbe34a5ea7d5 /internal/runtime
parented7cf2505d92e05411d476b445bda45cab9aaf89 (diff)
test: replace time.Sleep with deterministic synchronization in unit tests
Replace three time.Sleep usages in tests with channel-based and happens-before reasoning: - internal/ior_mode_test.go: waitForStreamRows no longer polls with time.Sleep(1ms); starter() only returns after the trace goroutine closes the started channel, which happens after all printCb pushes, forming a happens-before edge that guarantees the rows are visible. - internal/probemanager/manager_test.go: the intermediate attach-count assertions (enter==1, exit==0) are now checked immediately after <-enterBlocked, which is itself a happens-before edge, rather than after a 50ms sleep. The concurrent goroutine 2 is started afterwards; the final count assertions after both goroutines complete verify the serialization invariant. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Diffstat (limited to 'internal/runtime')
0 files changed, 0 insertions, 0 deletions