test: perform blocking query on agent

This commit is contained in:
Frank Schroeder 2017-05-23 02:43:07 +02:00
parent 36a2312639
commit 9fbac59f78
No known key found for this signature in database
GPG Key ID: 4D65C6EAEC87DECD
1 changed files with 7 additions and 1 deletions

View File

@ -156,7 +156,13 @@ func (a *TestAgent) Start() *TestAgent {
}
if a.Config.Bootstrap && a.Config.Server {
// Ensure we have a leader and a node registration.
args := &structs.DCSpecificRequest{Datacenter: a.Config.Datacenter}
args := &structs.DCSpecificRequest{
Datacenter: a.Config.Datacenter,
QueryOptions: structs.QueryOptions{
MinQueryIndex: out.Index,
MaxQueryTime: 25 * time.Millisecond,
},
}
if err := a.RPC("Catalog.ListNodes", args, &out); err != nil {
r.Fatalf("Catalog.ListNodes failed: %v", err)
}