Skip to content

Commit

Permalink
[chore][processor/spanmetricsprocessor] Enable goleak check
Browse files Browse the repository at this point in the history
  • Loading branch information
crobert-1 committed Feb 10, 2024
1 parent 384a94d commit 3a5619c
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
14 changes: 14 additions & 0 deletions processor/spanmetricsprocessor/package_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// Copyright The OpenTelemetry Authors
// SPDX-License-Identifier: Apache-2.0

package spanmetricsprocessor

import (
"testing"

"go.uber.org/goleak"
)

func TestMain(m *testing.M) {
goleak.VerifyTestMain(m)
}
1 change: 1 addition & 0 deletions processor/spanmetricsprocessor/processor_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,7 @@ func TestMetricCache(t *testing.T) {
ctx := metadata.NewIncomingContext(context.Background(), nil)
err := p.Start(ctx, mhost)
require.NoError(t, err)
defer func() { assert.NoError(t, p.Shutdown(ctx)) }()

// 0 key was cached at beginning
assert.Zero(t, len(p.histograms))
Expand Down

0 comments on commit 3a5619c

Please sign in to comment.