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

[config/configgrpc] [chore] Remove usage of deprecated ToListenerContext #9582

Merged
merged 1 commit into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 4 additions & 4 deletions config/configgrpc/configgrpc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ func TestGRPCServerSettingsError(t *testing.T) {

func TestGRPCServerSettings_ToListener_Error(t *testing.T) {
settings := ServerConfig{
NetAddr: confignet.AddrConfig{
NetAddr: confignet.NetAddr{
Endpoint: "127.0.0.1:1234567",
Transport: "tcp",
},
Expand Down Expand Up @@ -622,7 +622,7 @@ func TestHttpReception(t *testing.T) {
},
TLSSetting: test.tlsServerCreds,
}
ln, err := gss.ToListenerContext(context.Background())
ln, err := gss.NetAddr.Listen(context.Background())
assert.NoError(t, err)
s, err := gss.ToServer(componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings())
assert.NoError(t, err)
Expand Down Expand Up @@ -669,7 +669,7 @@ func TestReceiveOnUnixDomainSocket(t *testing.T) {
Transport: "unix",
},
}
ln, err := gss.ToListenerContext(context.Background())
ln, err := gss.NetAddr.Listen(context.Background())
assert.NoError(t, err)
srv, err := gss.ToServer(componenttest.NewNopHost(), componenttest.NewNopTelemetrySettings())
assert.NoError(t, err)
Expand Down Expand Up @@ -871,7 +871,7 @@ func TestClientInfoInterceptors(t *testing.T) {

defer srv.Stop()

l, err = gss.ToListenerContext(context.Background())
l, err = gss.NetAddr.Listen(context.Background())
require.NoError(t, err)

go func() {
Expand Down
2 changes: 1 addition & 1 deletion receiver/otlpreceiver/otlp.go
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ func (r *otlpReceiver) startGRPCServer(host component.Host) error {

r.settings.Logger.Info("Starting GRPC server", zap.String("endpoint", r.cfg.GRPC.NetAddr.Endpoint))
var gln net.Listener
if gln, err = r.cfg.GRPC.ToListenerContext(context.Background()); err != nil {
if gln, err = r.cfg.GRPC.NetAddr.Listen(context.Background()); err != nil {
return err
}

Expand Down
Loading