Skip to content

Commit

Permalink
nil check for r.cc in r.onError, before calling r.cc.ReportError(err)
Browse files Browse the repository at this point in the history
  • Loading branch information
purnesh42H committed Dec 21, 2024
1 parent d11cf5f commit 4b295c9
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions xds/internal/balancer/clusterresolver/e2e_test/eds_impl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1272,6 +1272,11 @@ func (s) TestEDS_EndpointWithMultipleAddresses(t *testing.T) {
// Create bootstrap configuration pointing to the above management server.
nodeID := uuid.New().String()
bootstrapContents := e2e.DefaultBootstrapContents(t, nodeID, mgmtServer.Address)
config, err := bootstrap.NewConfigForTesting(bootstrapContents)
if err != nil {
t.Fatalf("Failed to create an bootstrap config from contents: %v, %v", bootstrapContents, err)
}
pool := xdsclient.NewPool(config)

// Create xDS resources for consumption by the test. We start off with a
// single backend in a single EDS locality.
Expand All @@ -1288,9 +1293,8 @@ func (s) TestEDS_EndpointWithMultipleAddresses(t *testing.T) {

// Create an xDS client talking to the above management server, configured
// with a short watch expiry timeout.
xdsClient, close, err := xdsclient.NewForTesting(xdsclient.OptionsForTesting{
Name: t.Name(),
Contents: bootstrapContents,
xdsClient, close, err := pool.NewClientForTesting(xdsclient.OptionsForTesting{
Name: t.Name(),
})
if err != nil {
t.Fatalf("Failed to create an xDS client: %v", err)
Expand Down

0 comments on commit 4b295c9

Please sign in to comment.