This addresses the test flake occasionally seen in this repository. There was a channel being set to nil inappropriately, and uses of a direct call to channel close() when the more appropriate pattern is to cancel a context. This fixes the test flakes and lint problems from the upstream repository in https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/31996.
This addresses the test flake occasionally seen in this repository. There was a channel being set to
nil
inappropriately, and uses of a direct call to channel close() when the more appropriate pattern is to cancel a context. This fixes the test flakes and lint problems from the upstream repository in https://github.com/open-telemetry/opentelemetry-collector-contrib/pull/31996.