mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
avoid forwarding leadership checks in tests
The tests only care if a test server recognizes the leader.
This commit is contained in:
@@ -85,6 +85,7 @@ type rpcFn func(string, interface{}, interface{}) error
|
||||
func WaitForLeader(t testing.T, rpc rpcFn) {
|
||||
WaitForResult(func() (bool, error) {
|
||||
args := &structs.GenericRequest{}
|
||||
args.AllowStale = true
|
||||
var leader string
|
||||
err := rpc("Status.Leader", args, &leader)
|
||||
return leader != "", err
|
||||
|
||||
Reference in New Issue
Block a user