From 04b91945f40d5381be7a2151e7d3d139a590468d Mon Sep 17 00:00:00 2001 From: Piotr Tabor Date: Sat, 19 Sep 2020 17:12:19 +0200 Subject: [PATCH] pkg/testutil: Ignore flakes due to "leaked" testing.runTests goroutine. The flake happened e.g. in: https://travis-ci.com/github/etcd-io/etcd/jobs/386607570 ``` --- PASS: TestWatchClose (0.37s) PASS Unexpected goroutines running after all test(s). 1 instances of: testing.runTests.func1.1(...) /usr/local/go/src/testing/testing.go:1289 +0x60 created by testing.runTests.func1 /usr/local/go/src/testing/testing.go:1289 +0xdb FAIL go.etcd.io/etcd/v3/clientv3/integration 344.389s FAIL ``` This is implementation detail of Go testing.lib and we should not worry. --- pkg/testutil/leak.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/testutil/leak.go b/pkg/testutil/leak.go index 34a5a7306..77fce27e7 100644 --- a/pkg/testutil/leak.go +++ b/pkg/testutil/leak.go @@ -124,6 +124,7 @@ func interestingGoroutines() (gs []string) { strings.Contains(stack, "created by os/signal.init") || strings.Contains(stack, "runtime/panic.go") || strings.Contains(stack, "created by testing.RunTests") || + strings.Contains(stack, "created by testing.runTests") || strings.Contains(stack, "testing.Main(") || strings.Contains(stack, "runtime.goexit") || strings.Contains(stack, "go.etcd.io/etcd/v3/pkg/testutil.interestingGoroutines") ||