test: fail if there is no leader

This commit is contained in:
Frank Schroeder 2017-05-24 21:26:42 +02:00
parent c0680660d5
commit f4aa2ada4f
No known key found for this signature in database
GPG Key ID: 4D65C6EAEC87DECD
1 changed files with 3 additions and 0 deletions

View File

@ -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)
}