mirror of
https://github.com/status-im/consul.git
synced 2025-01-11 06:16:08 +00:00
agent/local: don't use time.After in test since notify is instant
This commit is contained in:
parent
6be4fa9118
commit
9f128e40d6
@ -1627,7 +1627,7 @@ func TestAgent_AliasCheck(t *testing.T) {
|
|||||||
l.UpdateCheck(types.CheckID("c1"), api.HealthCritical, "")
|
l.UpdateCheck(types.CheckID("c1"), api.HealthCritical, "")
|
||||||
select {
|
select {
|
||||||
case <-notifyCh:
|
case <-notifyCh:
|
||||||
case <-time.After(100 * time.Millisecond):
|
default:
|
||||||
t.Fatal("notify not received")
|
t.Fatal("notify not received")
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1653,7 +1653,7 @@ func TestAgent_AliasCheck(t *testing.T) {
|
|||||||
l.UpdateCheck(types.CheckID("c1"), api.HealthPassing, "")
|
l.UpdateCheck(types.CheckID("c1"), api.HealthPassing, "")
|
||||||
select {
|
select {
|
||||||
case <-notifyCh:
|
case <-notifyCh:
|
||||||
case <-time.After(100 * time.Millisecond):
|
default:
|
||||||
t.Fatal("notify not received")
|
t.Fatal("notify not received")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user