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()