From e721778f3ed43b5ec6beda5e3f2fa93eda38f352 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Fri, 7 Mar 2014 16:08:12 -0500 Subject: [PATCH] sync: give finalizers more time in TestPoolGC If we report a leak, make sure we've waited long enough to be sure. The new sleep regimen waits 1.05 seconds before failing; the old one waited 0.005 seconds. (The single linux/amd64 failure in this test feels more like a timing problem than a leak. I don't want to spend time on it unless we're sure.) LGTM=bradfitz R=bradfitz CC=golang-codereviews https://golang.org/cl/72630043 --- src/pkg/sync/pool_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pkg/sync/pool_test.go b/src/pkg/sync/pool_test.go index a34719ab2c..e444e50e5e 100644 --- a/src/pkg/sync/pool_test.go +++ b/src/pkg/sync/pool_test.go @@ -87,7 +87,7 @@ func TestPoolGC(t *testing.T) { } for i := 0; i < 5; i++ { runtime.GC() - time.Sleep(time.Millisecond) + time.Sleep(time.Duration(i*100+10) * time.Millisecond) // 1 pointer can remain on stack or elsewhere if atomic.LoadUint32(&fin) >= N-1 { return -- 2.50.0