Skip to content
Snippets Groups Projects
Commit 4ad45706 authored by Oliver Herms's avatar Oliver Herms
Browse files

Fixing test racecondition

parent 2e5746ba
No related branches found
No related tags found
No related merge requests found
......@@ -67,7 +67,19 @@ func TestClients(t *testing.T) {
cm.Register(client)
}
ret := cm.Clients()
assert.Equal(t, test.expected, ret)
for _, exp := range test.expected {
found := false
for _, client := range ret {
if exp == client {
found = true
continue
}
}
if !found {
t.Errorf("Test %q failed: Client %v not found in result: %v", exp, ret)
}
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment