From 77eecf10466e284030492a8ac2faf23c78df9911 Mon Sep 17 00:00:00 2001 From: Alvin Huang Date: Fri, 22 Feb 2019 15:40:59 -0500 Subject: [PATCH] add wait to TestClient_JoinLAN --- agent/consul/client_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/agent/consul/client_test.go b/agent/consul/client_test.go index d28e3994ee..0fca263339 100644 --- a/agent/consul/client_test.go +++ b/agent/consul/client_test.go @@ -84,8 +84,10 @@ func TestClient_JoinLAN(t *testing.T) { defer os.RemoveAll(dir2) defer c1.Shutdown() + testrpc.WaitForLeader(t, s1.RPC, "dc1") // Try to join joinLAN(t, c1, s1) + testrpc.WaitForTestAgent(t, c1.RPC, "dc1") retry.Run(t, func(r *retry.R) { if got, want := c1.routers.NumServers(), 1; got != want { r.Fatalf("got %d servers want %d", got, want)