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
1 changed files with 5 additions and 3 deletions

View File

@ -88,10 +88,12 @@ func TestLeader_FailedMember(t *testing.T) {
// Should be registered // Should be registered
state := s1.fsm.State() state := s1.fsm.State()
testutil.WaitForResult(func() (bool, error) {
_, found, _ := state.GetNode(c1.config.NodeName) _, found, _ := state.GetNode(c1.config.NodeName)
if !found { 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)