agent: fix data race in TestAgentAntiEntropy_EnableTagOverride

This commit is contained in:
Frank Schroeder 2017-06-30 13:44:07 +02:00 committed by Frank Schröder
parent 7f7c0ad65e
commit bcd2301b81
1 changed files with 3 additions and 0 deletions

View File

@ -312,6 +312,9 @@ func TestAgentAntiEntropy_EnableTagOverride(t *testing.T) {
r.Fatalf("err: %v", err) r.Fatalf("err: %v", err)
} }
a.state.RLock()
defer a.state.RUnlock()
// All the services should match // All the services should match
for id, serv := range services.NodeServices.Services { for id, serv := range services.NodeServices.Services {
serv.CreateIndex, serv.ModifyIndex = 0, 0 serv.CreateIndex, serv.ModifyIndex = 0, 0