mirror of https://github.com/status-im/consul.git
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:
parent
430dab8c37
commit
7bc941575c
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue