Fix race condition in TestLeader_FailedMember

This commit is contained in:
William Tisäter 2014-05-09 02:14:39 +02:00
parent f0a8866d42
commit 7ffc8cd29e

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)