Skip to content

Commit

Permalink
[chore][processor/cumulativetodeltaprocessor] Enable goleak check
Browse files Browse the repository at this point in the history
  • Loading branch information
crobert-1 committed Jan 26, 2024
1 parent 46ad449 commit bdd0566
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
1 change: 1 addition & 0 deletions processor/cumulativetodeltaprocessor/factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ func TestCreateProcessors(t *testing.T) {
consumertest.NewNop())
assert.NotNil(t, mp)
assert.NoError(t, mErr)
assert.NoError(t, mp.Shutdown(context.Background()))
})
}
}
17 changes: 17 additions & 0 deletions processor/cumulativetodeltaprocessor/package_test.go
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 cumulativetodeltaprocessor

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"))
}

0 comments on commit bdd0566

Please sign in to comment.