-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[chore][receiver/purefb] Enable goleak check (#32184)
This change enables `goleak` checks on the Pure Storage FlashBlade receiver to help ensure no goroutines are being leaked. This is a test only change as a test was missing a shutdown call. This looks like I deleted a test, but the two tests were identical, other than a missing shutdown call. Once the missing call was added they were identical, so I decided to delete one. I also consolidated err checking to remove the `err` variable and directly check the result of the `Start` and `Shutdown` methods. **Link to tracking Issue:** #30438
- Loading branch information
Showing
2 changed files
with
18 additions
and
23 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,15 @@ | ||
// Copyright The OpenTelemetry Authors | ||
// SPDX-License-Identifier: Apache-2.0 | ||
|
||
package purefbreceiver | ||
|
||
import ( | ||
"testing" | ||
|
||
"go.uber.org/goleak" | ||
) | ||
|
||
// See https://github.com/census-instrumentation/opencensus-go/issues/1191 for more information on opencensus ignore. | ||
func TestMain(m *testing.M) { | ||
goleak.VerifyTestMain(m, goleak.IgnoreTopFunction("go.opencensus.io/stats/view.(*worker).start")) | ||
} |