From 9fd1b7b1a8139de62a610b2a5cf71447655bb26c Mon Sep 17 00:00:00 2001 From: Ayke van Laethem Date: Wed, 6 Aug 2025 12:59:28 +0200 Subject: [PATCH] ci: make the goroutines test less racy Since we switched to OS threads for goroutines, the testdata/goroutines.go test has been flaky. Not surprising, if threads need to be scheduled within 1ms on a busy CI system. This PR makes the test a bit less flaky (hopefully) by increasing the time to 100ms. --- testdata/goroutines.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/testdata/goroutines.go b/testdata/goroutines.go index 7397b5503..32bc9fb81 100644 --- a/testdata/goroutines.go +++ b/testdata/goroutines.go @@ -14,9 +14,9 @@ func init() { func main() { println("main 1") go sub() - time.Sleep(1 * time.Millisecond) + time.Sleep(100 * time.Millisecond) println("main 2") - time.Sleep(2 * time.Millisecond) + time.Sleep(200 * time.Millisecond) println("main 3") // Await a blocking call. @@ -103,7 +103,7 @@ func acquire(m *sync.Mutex, wg *sync.WaitGroup) { func sub() { println("sub 1") - time.Sleep(2 * time.Millisecond) + time.Sleep(200 * time.Millisecond) println("sub 2") }