From cbdb54f22bfd83b2201b39b46ed4067321bd1b72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?William=20Tis=C3=A4ter?= Date: Fri, 30 May 2014 21:18:37 +0200 Subject: [PATCH] Log peers when `TestLeader_LeftServer` fail --- consul/leader_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/consul/leader_test.go b/consul/leader_test.go index d6aec6bd10..fc1c16cdfd 100644 --- a/consul/leader_test.go +++ b/consul/leader_test.go @@ -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) }) } }