diff --git a/modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/integration_test.go b/modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/integration_test.go index 93dc6d1..2f732fd 100644 --- a/modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/integration_test.go +++ b/modules/mesh-delivery-assigner/cmd/mesh-delivery-assigner/integration_test.go @@ -104,7 +104,10 @@ func (b *bed) startStoppable(t *testing.T) (<-chan error, func()) { env := map[string]string{"MESH_BROKER_FILE": broker} ctx, stop := context.WithCancel(b.ctx) done := make(chan error, 1) - go func() { done <- run(ctx, func(k string) string { return env[k] }, io.Discard) }() + go func() { + done <- run(ctx, func(k string) string { return env[k] }, io.Discard) + close(done) // a program that ended on its own (a refused start) is not waited for again at the cleanup + }() stopped := func() { stop() select {