From 16114ee529964b2cecfdcd332a29bb0aed9355cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Mon, 4 Mar 2024 14:18:08 +0100 Subject: [PATCH] Worker: fix Go scheduling issue in `sleep` command test Add a 1ms delay in the test loop, so that other goroutines can be scheduled as well. This should fix #104288. --- internal/worker/command_misc_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/worker/command_misc_test.go b/internal/worker/command_misc_test.go index 3958b621..292e81df 100644 --- a/internal/worker/command_misc_test.go +++ b/internal/worker/command_misc_test.go @@ -64,7 +64,7 @@ loop: select { case <-runDone: break loop - default: + case <-time.After(1 * time.Millisecond): mocks.clock.Add(timeStepSize) } }