consul: Server leave test fix

This commit is contained in:
Chavez 2014-12-05 10:50:23 -08:00
parent 7c1aad7b1d
commit 5f4281f98f
1 changed files with 5 additions and 3 deletions

View File

@ -256,10 +256,12 @@ func TestServer_Leave(t *testing.T) {
}
// Should lose a peer
testutil.WaitForResult(func() (bool, error) {
p1, _ = s1.raftPeers.Peers()
if len(p1) != 1 {
return len(p1) == 1, nil
}, func(err error) {
t.Fatalf("should have 1 peer: %v", p1)
}
})
}
func TestServer_RPC(t *testing.T) {