From 339f8fa4bd6b7a910d614a70edb36e117186562a Mon Sep 17 00:00:00 2001 From: Piotr Tabor Date: Thu, 4 Mar 2021 22:23:05 +0100 Subject: [PATCH 1/2] test.sh: Run integration tests with -v and shorter deadline. The purpose of this change is to learn more about flake cases like: https://travis-ci.com/github/etcd-io/etcd/jobs/488324449 ``` % (cd tests && 'env' 'go' 'test' '-timeout=30m' '--race=false' '--cpu=2' './integration/...') stderr: go: downloading github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e ok go.etcd.io/etcd/tests/v3/integration 197.295s ok go.etcd.io/etcd/tests/v3/integration/client 0.089s ok go.etcd.io/etcd/tests/v3/integration/client/examples 0.038s ok go.etcd.io/etcd/tests/v3/integration/clientv3 70.365s ok go.etcd.io/etcd/tests/v3/integration/clientv3/concurrency 3.169s ok go.etcd.io/etcd/tests/v3/integration/clientv3/connectivity 100.535s ok go.etcd.io/etcd/tests/v3/integration/clientv3/examples 1.341s ok go.etcd.io/etcd/tests/v3/integration/clientv3/experimental/recipes 3.277s No output has been received in the last 10m0s, ``` --- test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.sh b/test.sh index 7ffd7c58b..1a985653a 100755 --- a/test.sh +++ b/test.sh @@ -110,7 +110,7 @@ function integration_extra { function integration_pass { local pkgs=${USERPKG:-"./integration/..."} - run_for_module "tests" go_test "${pkgs}" "parallel" : -timeout="${TIMEOUT:-30m}" "${COMMON_TEST_FLAGS[@]}" "${RUN_ARG[@]}" "$@" || return $? + run_for_module "tests" go_test "${pkgs}" "parallel" : -timeout="${TIMEOUT:-15m}" "-v" "${COMMON_TEST_FLAGS[@]}" "${RUN_ARG[@]}" "$@" || return $? integration_extra "$@" } From 66cef61444e132f77edfb19154e1fa2deac11657 Mon Sep 17 00:00:00 2001 From: Piotr Tabor Date: Thu, 4 Mar 2021 22:28:44 +0100 Subject: [PATCH 2/2] Detect leaked go-routines bases on pre-normalization syntax. --- pkg/testutil/leak.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/testutil/leak.go b/pkg/testutil/leak.go index f13eb5e85..504ef962c 100644 --- a/pkg/testutil/leak.go +++ b/pkg/testutil/leak.go @@ -126,7 +126,7 @@ func interestingGoroutines() (gs []string) { strings.Contains(stack, "created by text/template/parse.lex") || strings.Contains(stack, "runtime.MHeap_Scavenger") || strings.Contains(stack, "rcrypto/internal/boring.(*PublicKeyRSA).finalize") || - strings.Contains(stack, "net.(*netFD).Close(...)") { + strings.Contains(stack, "net.(*netFD).Close(") { continue } gs = append(gs, stack)