From 7bc941575c977778dc112b57c9c8cee8d6ea1e3b Mon Sep 17 00:00:00 2001 From: "R.B. Boyer" Date: Mon, 26 Aug 2019 15:19:59 -0500 Subject: [PATCH] test: don't leak agent goroutines in TestAgent_sidecarServiceFromNodeService (#6396) A goroutine dump using runtime.Stack() before/after shows a drop from 121 => 4. --- agent/sidecar_service_test.go | 1 + 1 file changed, 1 insertion(+) diff --git a/agent/sidecar_service_test.go b/agent/sidecar_service_test.go index 094ec0d575..12f4e2dc3c 100644 --- a/agent/sidecar_service_test.go +++ b/agent/sidecar_service_test.go @@ -322,6 +322,7 @@ func TestAgent_sidecarServiceFromNodeService(t *testing.T) { require := require.New(t) a := NewTestAgent(t, "jones", hcl) + defer a.Shutdown() if tt.preRegister != nil { err := a.AddService(tt.preRegister.NodeService(), nil, false, "", ConfigSourceLocal)