From 0c2d9b078212bd764a3a46e2cc139c4edee9282e Mon Sep 17 00:00:00 2001 From: Pierre Souchay Date: Mon, 27 Aug 2018 17:45:07 +0200 Subject: [PATCH] Fixed unstable test TestProxy_public (#4587) --- connect/proxy/proxy_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/connect/proxy/proxy_test.go b/connect/proxy/proxy_test.go index 681f802c4..bec83af4e 100644 --- a/connect/proxy/proxy_test.go +++ b/connect/proxy/proxy_test.go @@ -7,6 +7,8 @@ import ( "os" "testing" + "github.com/hashicorp/consul/testrpc" + "github.com/hashicorp/consul/agent" agConnect "github.com/hashicorp/consul/agent/connect" "github.com/hashicorp/consul/api" @@ -25,6 +27,7 @@ func TestProxy_public(t *testing.T) { a := agent.NewTestAgent(t.Name(), "") defer a.Shutdown() client := a.Client() + testrpc.WaitForLeader(t, a.RPC, "dc1") // Register the service so we can get a leaf cert _, err := client.Catalog().Register(&api.CatalogRegistration{