mirror of https://github.com/status-im/consul.git
Merge pull request #175 from nelhage/fix-tests
Fix some issues in tests.
This commit is contained in:
commit
f5bd176fb3
|
@ -74,7 +74,7 @@ func TestCheckMonitor_LimitOutput(t *testing.T) {
|
|||
check := &CheckMonitor{
|
||||
Notify: mock,
|
||||
CheckID: "foo",
|
||||
Script: "dd if=/dev/urandom bs=8192 count=10",
|
||||
Script: "od -N 81920 /dev/urandom",
|
||||
Interval: 25 * time.Millisecond,
|
||||
Logger: log.New(os.Stderr, "", log.LstdFlags),
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ func WaitForLeader(t *testing.T, rpc rpcFn, dc string) structs.IndexedNodes {
|
|||
Datacenter: dc,
|
||||
}
|
||||
err := rpc("Catalog.ListNodes", args, &out)
|
||||
return out.QueryMeta.KnownLeader, err
|
||||
return out.QueryMeta.KnownLeader && out.Index > 0, err
|
||||
}, func(err error) {
|
||||
t.Fatalf("failed to find leader: %v", err)
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue