From 9f128e40d6a650ed326c1a89e285962e332df458 Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 18 Jul 2018 16:16:28 -0500 Subject: [PATCH] agent/local: don't use time.After in test since notify is instant --- agent/local/state_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/agent/local/state_test.go b/agent/local/state_test.go index 4a0e8f21fb..11590e5122 100644 --- a/agent/local/state_test.go +++ b/agent/local/state_test.go @@ -1627,7 +1627,7 @@ func TestAgent_AliasCheck(t *testing.T) { l.UpdateCheck(types.CheckID("c1"), api.HealthCritical, "") select { case <-notifyCh: - case <-time.After(100 * time.Millisecond): + default: t.Fatal("notify not received") } @@ -1653,7 +1653,7 @@ func TestAgent_AliasCheck(t *testing.T) { l.UpdateCheck(types.CheckID("c1"), api.HealthPassing, "") select { case <-notifyCh: - case <-time.After(100 * time.Millisecond): + default: t.Fatal("notify not received") } }