Fix race condition in `TestLeader_FailedMember`

This commit is contained in:
William Tisäter 2014-05-09 02:14:39 +02:00
parent d6f3dc510c
commit 9b6b75f77c
1 changed files with 5 additions and 3 deletions

View File

@ -88,10 +88,12 @@ func TestLeader_FailedMember(t *testing.T) {
// Should be registered
state := s1.fsm.State()
testutil.WaitForResult(func() (bool, error) {
_, found, _ := state.GetNode(c1.config.NodeName)
if !found {
return found == true, nil
}, func(err error) {
t.Fatalf("client not registered")
}
})
// Should have a check
_, checks := state.NodeChecks(c1.config.NodeName)