Fix flaky test

This commit is contained in:
Ken Hibino
2020-09-01 05:25:08 -07:00
parent a9c31553b8
commit eb739a0258

View File

@@ -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 {