-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[chore][awscloudwatchlogsexporter] Enable goleak check (#31891)
Description: Enables `goleak` checking on the `awscloudwatchlogsexporter` package. Link to tracking Issue: #30438 Signed-off-by: Israel Blancas <iblancasa@gmail.com>
- Loading branch information
Showing
2 changed files
with
18 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// Copyright The OpenTelemetry Authors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package awscloudwatchlogsexporter | ||
|
||
import ( | ||
"testing" | ||
|
||
"go.uber.org/goleak" | ||
) | ||
|
||
// The IgnoreTopFunction call prevents catching the leak generated by opencensus | ||
// defaultWorker.Start which at this time is part of the package's init call. | ||
// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information. | ||
func TestMain(m *testing.M) { | ||
goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) | ||
} |