Log peers when `TestLeader_LeftServer` fail

This commit is contained in:
William Tisäter 2014-05-30 21:18:37 +02:00
parent 9e3ad6721c
commit cbdb54f22b
1 changed files with 2 additions and 2 deletions

View File

@ -321,9 +321,9 @@ func TestLeader_LeftServer(t *testing.T) {
for _, s := range servers[1:] {
testutil.WaitForResult(func() (bool, error) {
peers, _ := s.raftPeers.Peers()
return len(peers) == 2, nil
return len(peers) == 2, errors.New(fmt.Sprintf("%v", peers))
}, func(err error) {
t.Fatalf("should have 2 peers")
t.Fatalf("should have 2 peers: %v", err)
})
}
}