2
0
mirror of https://github.com/hibiken/asynq.git synced 2024-11-14 11:31:18 +08:00

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 queues map[string]int
concurrency 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) timeCmpOpt := cmpopts.EquateApproxTime(10 * time.Millisecond)
@ -68,7 +68,7 @@ func TestHeartbeater(t *testing.T) {
} }
// allow for heartbeater to write to redis // allow for heartbeater to write to redis
time.Sleep(tc.interval * 2) time.Sleep(tc.interval)
ss, err := rdbClient.ListServers() ss, err := rdbClient.ListServers()
if err != nil { if err != nil {