Skip to content

Commit

Permalink
[chore] avoid flaky test by using port 0 (#10678)
Browse files Browse the repository at this point in the history
#### Description
Use port zero since we just start and stop the server.

#### Link to tracking issue
Fixes #9772
  • Loading branch information
atoulme authored Jul 25, 2024
1 parent 95902c1 commit ef7f285
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions receiver/otlpreceiver/factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,12 +148,12 @@ func TestCreateMetricReceiver(t *testing.T) {
factory := NewFactory()
defaultGRPCSettings := &configgrpc.ServerConfig{
NetAddr: confignet.AddrConfig{
Endpoint: testutil.GetAvailableLocalAddress(t),
Endpoint: "127.0.0.1:0",
Transport: confignet.TransportTypeTCP,
},
}
defaultServerConfig := confighttp.NewDefaultServerConfig()
defaultServerConfig.Endpoint = testutil.GetAvailableLocalAddress(t)
defaultServerConfig.Endpoint = "127.0.0.1:0"
defaultHTTPSettings := &HTTPConfig{
ServerConfig: &defaultServerConfig,
TracesURLPath: defaultTracesURLPath,
Expand Down

0 comments on commit ef7f285

Please sign in to comment.