]> Cypherpunks repositories - gostls13.git/commitdiff
[release-branch.go1.8] runtime: deflake TestPeriodicGC
authorRuss Cox <rsc@golang.org>
Wed, 4 Oct 2017 16:28:20 +0000 (12:28 -0400)
committerRuss Cox <rsc@golang.org>
Wed, 4 Oct 2017 18:04:50 +0000 (18:04 +0000)
It was only waiting 0.1 seconds for the two GCs it wanted.
Let it wait 1 second.

Change-Id: Ib3cdc8127cbf95694a9f173643c02529a85063af
Reviewed-on: https://go-review.googlesource.com/68150
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Chris Broadfoot <cbro@golang.org>
Reviewed-by: Austin Clements <austin@google.com>
src/runtime/gc_test.go

index 4a32f151675b81982b3dbdcacb8786a36d552944..342010b1d554ee62b572a52bfa70f31d4b6f9bcc 100644 (file)
@@ -169,7 +169,7 @@ func TestPeriodicGC(t *testing.T) {
        // slack if things are slow.
        var numGCs uint32
        const want = 2
-       for i := 0; i < 20 && numGCs < want; i++ {
+       for i := 0; i < 200 && numGCs < want; i++ {
                time.Sleep(5 * time.Millisecond)
 
                // Test that periodic GC actually happened.