mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-19 03:54:01 +00:00
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.
This commit is contained in:
committed by
Ron Evans
parent
a38829c692
commit
9fd1b7b1a8
Vendored
+3
-3
@@ -14,9 +14,9 @@ func init() {
|
|||||||
func main() {
|
func main() {
|
||||||
println("main 1")
|
println("main 1")
|
||||||
go sub()
|
go sub()
|
||||||
time.Sleep(1 * time.Millisecond)
|
time.Sleep(100 * time.Millisecond)
|
||||||
println("main 2")
|
println("main 2")
|
||||||
time.Sleep(2 * time.Millisecond)
|
time.Sleep(200 * time.Millisecond)
|
||||||
println("main 3")
|
println("main 3")
|
||||||
|
|
||||||
// Await a blocking call.
|
// Await a blocking call.
|
||||||
@@ -103,7 +103,7 @@ func acquire(m *sync.Mutex, wg *sync.WaitGroup) {
|
|||||||
|
|
||||||
func sub() {
|
func sub() {
|
||||||
println("sub 1")
|
println("sub 1")
|
||||||
time.Sleep(2 * time.Millisecond)
|
time.Sleep(200 * time.Millisecond)
|
||||||
println("sub 2")
|
println("sub 2")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user