From 3a35e0253c8344ae4efb975e4bdc0cc53b841e0a Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Wed, 4 Oct 2017 12:28:20 -0400 Subject: [PATCH] runtime: deflake TestPeriodicGC 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/68151 Run-TryBot: Russ Cox Reviewed-by: Austin Clements TryBot-Result: Gobot Gobot --- src/runtime/gc_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/runtime/gc_test.go b/src/runtime/gc_test.go index ece5641e1f..0620f2d61e 100644 --- a/src/runtime/gc_test.go +++ b/src/runtime/gc_test.go @@ -170,7 +170,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.