diff --git a/pkg/component/runtime/manager_test.go b/pkg/component/runtime/manager_test.go index 996fe0cc1d9..b94f42e1d26 100644 --- a/pkg/component/runtime/manager_test.go +++ b/pkg/component/runtime/manager_test.go @@ -141,7 +141,11 @@ func newDebugLogger(t *testing.T) *logger.Logger { func drainErrChan(ch chan error) { for { select { - case <-ch: + case _, ok := <-ch: + // channel is closed, nothing to drain + if !ok { + return + } default: return }