test: don't leak agent goroutines in TestAgent_sidecarServiceFromNodeService (#6396)

A goroutine dump using runtime.Stack() before/after shows a drop from 121 => 4.
This commit is contained in:
R.B. Boyer 2019-08-26 15:19:59 -05:00 committed by GitHub
parent 430dab8c37
commit 7bc941575c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -322,6 +322,7 @@ func TestAgent_sidecarServiceFromNodeService(t *testing.T) {
require := require.New(t) require := require.New(t)
a := NewTestAgent(t, "jones", hcl) a := NewTestAgent(t, "jones", hcl)
defer a.Shutdown()
if tt.preRegister != nil { if tt.preRegister != nil {
err := a.AddService(tt.preRegister.NodeService(), nil, false, "", ConfigSourceLocal) err := a.AddService(tt.preRegister.NodeService(), nil, false, "", ConfigSourceLocal)