From c997a91472d2c117ebe8d53b68d73a3b259026eb Mon Sep 17 00:00:00 2001 From: Janos Guljas Date: Thu, 26 Dec 2019 20:37:59 +0100 Subject: [PATCH] Adjust TestWithRecoverFunc and TestClientRetryFailure timings --- client/http/http_client_test.go | 2 +- servers/servers_test.go | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/client/http/http_client_test.go b/client/http/http_client_test.go index 51efa8a..4bd3143 100644 --- a/client/http/http_client_test.go +++ b/client/http/http_client_test.go @@ -79,7 +79,7 @@ func TestClientRetryFailure(t *testing.T) { l.Close() go func() { - time.Sleep(2 * time.Second) + time.Sleep(3 * time.Second) l, err := net.Listen("tcp", fmt.Sprintf("localhost:%d", port)) if err != nil { diff --git a/servers/servers_test.go b/servers/servers_test.go index 5ce0fb9..8b3f479 100644 --- a/servers/servers_test.go +++ b/servers/servers_test.go @@ -17,6 +17,7 @@ import ( "strings" "sync" "testing" + "time" ) var ( @@ -200,6 +201,7 @@ func TestWithRecoverFunc(t *testing.T) { } <-m.serving + time.Sleep(time.Second) mu.Lock() defer mu.Unlock()