From f4aa2ada4fefedcb8fb7e904294759f20132b1c9 Mon Sep 17 00:00:00 2001 From: Frank Schroeder Date: Wed, 24 May 2017 21:26:42 +0200 Subject: [PATCH] test: fail if there is no leader --- consul/server_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/consul/server_test.go b/consul/server_test.go index 18fe8d2f92..e00d4f2f3c 100644 --- a/consul/server_test.go +++ b/consul/server_test.go @@ -605,6 +605,9 @@ func testVerifyRPC(s1, s2 *Server, t *testing.T) (bool, error) { } } s2.localLock.RUnlock() + if leader == nil { + t.Fatal("no leader") + } return s2.connPool.PingConsulServer(leader) }