mirror of https://github.com/status-im/consul.git
Fix race condition in `TestLeader_FailedMember`
This commit is contained in:
parent
f0a8866d42
commit
7ffc8cd29e
|
@ -88,10 +88,12 @@ func TestLeader_FailedMember(t *testing.T) {
|
||||||
|
|
||||||
// Should be registered
|
// Should be registered
|
||||||
state := s1.fsm.State()
|
state := s1.fsm.State()
|
||||||
_, found, _ := state.GetNode(c1.config.NodeName)
|
testutil.WaitForResult(func() (bool, error) {
|
||||||
if !found {
|
_, found, _ := state.GetNode(c1.config.NodeName)
|
||||||
|
return found == true, nil
|
||||||
|
}, func(err error) {
|
||||||
t.Fatalf("client not registered")
|
t.Fatalf("client not registered")
|
||||||
}
|
})
|
||||||
|
|
||||||
// Should have a check
|
// Should have a check
|
||||||
_, checks := state.NodeChecks(c1.config.NodeName)
|
_, checks := state.NodeChecks(c1.config.NodeName)
|
||||||
|
|
Loading…
Reference in New Issue