mirror of
https://github.com/hibiken/asynq.git
synced 2024-11-14 19:38:49 +08:00
Fix flaky test
This commit is contained in:
parent
a9c31553b8
commit
eb739a0258
@ -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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user