Skip to content

Commit

Permalink
[chore][pkg/stanza/adapter] Enable goleak check (#30969)
Browse files Browse the repository at this point in the history
  • Loading branch information
crobert-1 authored Feb 1, 2024
1 parent 03630a1 commit 5904031
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
1 change: 1 addition & 0 deletions pkg/stanza/adapter/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ func TestEmitterToConsumer(t *testing.T) {

err = logsReceiver.Start(context.Background(), componenttest.NewNopHost())
require.NoError(t, err)
defer func() { require.NoError(t, logsReceiver.Shutdown(context.Background())) }()

go func() {
ctx := context.Background()
Expand Down
14 changes: 14 additions & 0 deletions pkg/stanza/adapter/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 adapter

import (
"testing"

"go.uber.org/goleak"
)

func TestMain(m *testing.M) {
goleak.VerifyTestMain(m)
}
1 change: 1 addition & 0 deletions pkg/stanza/adapter/storage_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ func TestFindCorrectStorageExtension(t *testing.T) {
err := r.Start(context.Background(), host)
require.NoError(t, err)
require.NotNil(t, r.storageClient)
defer func() { require.NoError(t, r.Shutdown(context.Background())) }()

clientCreatorID, err := storagetest.CreatorID(context.Background(), r.storageClient)
require.NoError(t, err)
Expand Down

0 comments on commit 5904031

Please sign in to comment.