diff --git a/test/goprint.go b/test/goprint.go index cdaccf4f796..7cf6230fc6c 100644 --- a/test/goprint.go +++ b/test/goprint.go @@ -8,9 +8,14 @@ package main -import "time" +import ( + "runtime" + "time" +) func main() { go println(42, true, false, true, 1.5, "world", (chan int)(nil), []int(nil), (map[string]int)(nil), (func())(nil), byte(255)) - time.Sleep(100*time.Millisecond) + for runtime.NumGoroutine() > 1 { + time.Sleep(10*time.Millisecond) + } }