diff --git a/agent/consul/client_test.go b/agent/consul/client_test.go index 97958b4866..982eb80ab8 100644 --- a/agent/consul/client_test.go +++ b/agent/consul/client_test.go @@ -824,6 +824,7 @@ func TestClient_ReloadConfig(t *testing.T) { deps := newDefaultDeps(t, &Config{NodeName: "node1", Datacenter: "dc1"}) c, err := NewClient(cfg, deps) require.NoError(t, err) + defer c.Shutdown() limiter := c.rpcLimiter.Load().(*rate.Limiter) require.Equal(t, rate.Limit(500), limiter.Limit()) @@ -869,7 +870,6 @@ func TestClient_ShortReconnectTimeout(t *testing.T) { func() bool { return len(cluster.Servers[0].LANMembersInAgentPartition()) == 2 && len(cluster.Clients[0].LANMembersInAgentPartition()) == 2 - }, time.Second, 50*time.Millisecond, @@ -901,6 +901,7 @@ func TestClient_RPC_Timeout(t *testing.T) { c.MaxQueryTime = 200 * time.Millisecond c.RPCHoldTimeout = 50 * time.Millisecond }) + defer c1.Shutdown() joinLAN(t, c1, s1) retry.Run(t, func(r *retry.R) {