From 42af4cdc70d3453759002a80aa50f23a76fbcbd0 Mon Sep 17 00:00:00 2001 From: Frank Schroeder Date: Mon, 23 Oct 2017 10:08:32 +0200 Subject: [PATCH] Revert "local state: make test more robust" This reverts commit f9267380dbcdb2746393eee5067e5037dff2b184. --- agent/local/state_test.go | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/agent/local/state_test.go b/agent/local/state_test.go index a697162f7e..d40300a4c2 100644 --- a/agent/local/state_test.go +++ b/agent/local/state_test.go @@ -1036,12 +1036,14 @@ func TestAgent_UpdateCheck_DiscardOutput(t *testing.T) { if err := a.State.AddCheck(check, ""); err != nil { t.Fatalf("bad: %s", err) } - if err := a.State.SyncFull(); err != nil { - t.Fatal("bad: %s", err) - } - if !inSync("web") { - t.Fatal("check should be in sync") - } + + // wait until the check is in sync + retry.Run(t, func(r *retry.R) { + if inSync("web") { + return + } + r.FailNow() + }) // update the check with the same status but different output // and the check should still be in sync.