From d55d8017dc1a614575c247b80bc21180bf8a7679 Mon Sep 17 00:00:00 2001 From: William Banfield Date: Tue, 24 Aug 2021 12:52:21 -0400 Subject: [PATCH] add small timeout to requireConnect --- inspect/inspect_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/inspect/inspect_test.go b/inspect/inspect_test.go index 7f2f8d819..e25629429 100644 --- a/inspect/inspect_test.go +++ b/inspect/inspect_test.go @@ -8,6 +8,7 @@ import ( "strings" "sync" "testing" + "time" "github.com/fortytw2/leaktest" "github.com/stretchr/testify/mock" @@ -575,6 +576,8 @@ func requireConnect(t testing.TB, addr string, retries int) { conn.Close() return } + //FIXME attempt to yield and let the other goroutine continue execution. + time.Sleep(time.Microsecond) } t.Fatalf("unable to connect to server %s after %d tries: %s", addr, retries, err) }