Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[chore][extension/jaegarremotesampling] Enable goleak check #31155

Merged
merged 2 commits into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions extension/jaegerremotesampling/extension_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@ func TestRemote(t *testing.T) {
resp, err := http.Get("http://127.0.0.1:5778/sampling?service=foo")
assert.NoError(t, err)
assert.Equal(t, 200, resp.StatusCode)
assert.NoError(t, resp.Body.Close())
}

// shut down the server
Expand All @@ -137,6 +138,8 @@ func TestRemote(t *testing.T) {
assert.Equal(t, []string{string(expectedHeaderValue)}, md.Get(expectedHeaderName))
}
}

server.Stop()
crobert-1 marked this conversation as resolved.
Show resolved Hide resolved
})
}
}
Expand Down
1 change: 1 addition & 0 deletions extension/jaegerremotesampling/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ require (
go.opentelemetry.io/collector/featuregate v1.1.0
go.opentelemetry.io/otel/metric v1.23.0
go.opentelemetry.io/otel/trace v1.23.0
go.uber.org/goleak v1.3.0
go.uber.org/zap v1.26.0
google.golang.org/grpc v1.61.0
)
Expand Down
1 change: 1 addition & 0 deletions extension/jaegerremotesampling/go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions extension/jaegerremotesampling/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 jaegerremotesampling

import (
"testing"

"go.uber.org/goleak"
)

func TestMain(m *testing.M) {
goleak.VerifyTestMain(m)
}
Loading