From 9fbac59f78ce2d3405a12a599049984b82772145 Mon Sep 17 00:00:00 2001 From: Frank Schroeder Date: Tue, 23 May 2017 02:43:07 +0200 Subject: [PATCH] test: perform blocking query on agent --- command/agent/testagent.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/command/agent/testagent.go b/command/agent/testagent.go index ef2d20b9b..6d3a04044 100644 --- a/command/agent/testagent.go +++ b/command/agent/testagent.go @@ -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) }