From 86f7ea601342d6f3ceb9d0dc74bd5b33dae0b8d8 Mon Sep 17 00:00:00 2001 From: Frank Schroeder Date: Mon, 28 Aug 2017 14:17:18 +0200 Subject: [PATCH] local state: fix TestAgentAntiEntropy_EnableTagOverride The test had a race condition where it relied on the first service to be synced to the remote catalog which sometimes failed. --- agent/local/state_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/agent/local/state_test.go b/agent/local/state_test.go index c01d582378..ebf187349d 100644 --- a/agent/local/state_test.go +++ b/agent/local/state_test.go @@ -246,6 +246,9 @@ func TestAgentAntiEntropy_EnableTagOverride(t *testing.T) { EnableTagOverride: true, } a.State.AddService(srv1, "") + if err := a.State.SyncChanges(); err != nil { + t.Fatalf("err: %v", err) + } srv1_mod := new(structs.NodeService) *srv1_mod = *srv1 srv1_mod.Port = 7100