From add26ebad46ac50857ef4c88930e99ae04cd9ba1 Mon Sep 17 00:00:00 2001 From: Ken Hibino Date: Tue, 1 Sep 2020 05:25:08 -0700 Subject: [PATCH] Fix flaky test --- heartbeat_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/heartbeat_test.go b/heartbeat_test.go index ebd8a75..6f9054b 100644 --- a/heartbeat_test.go +++ b/heartbeat_test.go @@ -28,7 +28,7 @@ func TestHeartbeater(t *testing.T) { queues map[string]int concurrency int }{ - {time.Second, "localhost", 45678, map[string]int{"default": 1}, 10}, + {2 * time.Second, "localhost", 45678, map[string]int{"default": 1}, 10}, } timeCmpOpt := cmpopts.EquateApproxTime(10 * time.Millisecond) @@ -68,7 +68,7 @@ func TestHeartbeater(t *testing.T) { } // allow for heartbeater to write to redis - time.Sleep(tc.interval * 2) + time.Sleep(tc.interval) ss, err := rdbClient.ListServers() if err != nil {