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.
This commit is contained in:
Frank Schroeder 2017-08-28 14:17:18 +02:00 committed by Frank Schröder
parent 71e4d7cd1c
commit b288c1eb9b
1 changed files with 3 additions and 0 deletions

View File

@ -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