1
0
mirror of https://github.com/golang/go synced 2024-11-18 02:34:46 -07:00

runtime/trace: deflake TestTraceSymbolize

Waiting 2ms for all the kicked-off goroutines to run and block
seems a little optimistic. No harm done by waiting for 200ms instead.

Fixes #17238.

Change-Id: I827532ea2f5f1f3ed04179f8957dd2c563946ed0
Reviewed-on: https://go-review.googlesource.com/32103
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Russ Cox 2016-10-26 22:18:02 -04:00
parent 3366d6a39b
commit 2a7272b422

View File

@ -102,10 +102,10 @@ func TestTraceSymbolize(t *testing.T) {
pipeReadDone <- true pipeReadDone <- true
}() }()
time.Sleep(time.Millisecond) time.Sleep(100 * time.Millisecond)
runtime.GC() runtime.GC()
runtime.Gosched() runtime.Gosched()
time.Sleep(time.Millisecond) // the last chance for the goroutines above to block time.Sleep(100 * time.Millisecond) // the last chance for the goroutines above to block
done1 <- true done1 <- true
<-done2 <-done2
select { select {