]> Cypherpunks repositories - gostls13.git/commitdiff
runtime/trace: deflake TestTraceSymbolize
authorRuss Cox <rsc@golang.org>
Thu, 27 Oct 2016 02:18:02 +0000 (22:18 -0400)
committerRuss Cox <rsc@golang.org>
Fri, 28 Oct 2016 19:32:37 +0000 (19:32 +0000)
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>
src/runtime/trace/trace_stack_test.go

index 52a71bfb94c68c0af548add5c10160ee1a2fcb56..b143341f590419fc988c657e8e287f888841a01c 100644 (file)
@@ -102,10 +102,10 @@ func TestTraceSymbolize(t *testing.T) {
                pipeReadDone <- true
        }()
 
-       time.Sleep(time.Millisecond)
+       time.Sleep(100 * time.Millisecond)
        runtime.GC()
        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
        <-done2
        select {