From 4dca4f0614995c50c703099a56b446ad66f596a5 Mon Sep 17 00:00:00 2001 From: Curtis Robert Date: Thu, 14 Mar 2024 16:28:44 -0700 Subject: [PATCH] [chore][receiver/jmx/internal/subprocess] Enable goleak check --- receiver/jmxreceiver/go.mod | 1 + .../internal/subprocess/package_test.go | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 receiver/jmxreceiver/internal/subprocess/package_test.go diff --git a/receiver/jmxreceiver/go.mod b/receiver/jmxreceiver/go.mod index cdfe2ef5681d..7be8703c9ac4 100644 --- a/receiver/jmxreceiver/go.mod +++ b/receiver/jmxreceiver/go.mod @@ -19,6 +19,7 @@ require ( go.opentelemetry.io/collector/receiver/otlpreceiver v0.96.1-0.20240306115632-b2693620eff6 go.opentelemetry.io/otel/metric v1.24.0 go.opentelemetry.io/otel/trace v1.24.0 + go.uber.org/goleak v1.3.0 go.uber.org/zap v1.27.0 ) diff --git a/receiver/jmxreceiver/internal/subprocess/package_test.go b/receiver/jmxreceiver/internal/subprocess/package_test.go new file mode 100644 index 000000000000..b279dcaaa0d2 --- /dev/null +++ b/receiver/jmxreceiver/internal/subprocess/package_test.go @@ -0,0 +1,14 @@ +// Copyright The OpenTelemetry Authors +// SPDX-License-Identifier: Apache-2.0 + +package subprocess + +import ( + "testing" + + "go.uber.org/goleak" +) + +func TestMain(m *testing.M) { + goleak.VerifyTestMain(m) +}