diff --git a/examples/features/customloadbalancer/client/main.go b/examples/features/customloadbalancer/client/main.go index 02170029c59c..f03dcb9f2ebf 100644 --- a/examples/features/customloadbalancer/client/main.go +++ b/examples/features/customloadbalancer/client/main.go @@ -61,7 +61,7 @@ func main() { cc, err := grpc.NewClient(mr.Scheme()+":///", grpc.WithResolvers(mr), grpc.WithTransportCredentials(insecure.NewCredentials())) if err != nil { - log.Fatalf("Failed to dial: %v", err) + log.Fatalf("Failed to create a client for server: %v", err) } defer cc.Close() ctx, cancel := context.WithTimeout(context.Background(), time.Second*10) diff --git a/test/clientconn_state_transition_test.go b/test/clientconn_state_transition_test.go index 547b5ffb9a24..3283c1e08692 100644 --- a/test/clientconn_state_transition_test.go +++ b/test/clientconn_state_transition_test.go @@ -236,14 +236,14 @@ func (s) TestStateTransitions_ReadyToConnecting(t *testing.T) { conn.Close() }() - client, err := grpc.Dial(lis.Addr().String(), + client, err := grpc.NewClient(lis.Addr().String(), grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithDefaultServiceConfig(fmt.Sprintf(`{"loadBalancingConfig": [{"%s":{}}]}`, stateRecordingBalancerName))) if err != nil { t.Fatal(err) } defer client.Close() - + client.Connect() ctx, cancel := context.WithTimeout(context.Background(), defaultTestTimeout) defer cancel() go testutils.StayConnected(ctx, client) @@ -324,7 +324,7 @@ func (s) TestStateTransitions_TriesAllAddrsBeforeTransientFailure(t *testing.T) {Addr: lis1.Addr().String()}, {Addr: lis2.Addr().String()}, }}) - client, err := grpc.Dial("whatever:///this-gets-overwritten", + client, err := grpc.NewClient("whatever:///this-gets-overwritten", grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithDefaultServiceConfig(fmt.Sprintf(`{"loadBalancingConfig": [{"%s":{}}]}`, stateRecordingBalancerName)), grpc.WithConnectParams(grpc.ConnectParams{ @@ -339,7 +339,7 @@ func (s) TestStateTransitions_TriesAllAddrsBeforeTransientFailure(t *testing.T) t.Fatal(err) } defer client.Close() - + client.Connect() stateNotifications := testBalancerBuilder.nextStateNotifier() want := []connectivity.State{ connectivity.Connecting, @@ -427,7 +427,7 @@ func (s) TestStateTransitions_MultipleAddrsEntersReady(t *testing.T) { {Addr: lis1.Addr().String()}, {Addr: lis2.Addr().String()}, }}) - client, err := grpc.Dial("whatever:///this-gets-overwritten", + client, err := grpc.NewClient("whatever:///this-gets-overwritten", grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithDefaultServiceConfig(fmt.Sprintf(`{"loadBalancingConfig": [{"%s":{}}]}`, stateRecordingBalancerName)), grpc.WithResolvers(rb)) @@ -435,7 +435,7 @@ func (s) TestStateTransitions_MultipleAddrsEntersReady(t *testing.T) { t.Fatal(err) } defer client.Close() - + client.Connect() ctx, cancel := context.WithTimeout(context.Background(), defaultTestTimeout) defer cancel() go testutils.StayConnected(ctx, client) @@ -571,15 +571,15 @@ func (s) TestConnectivityStateSubscriber(t *testing.T) { // Create the ClientConn. const testResName = "any" rb := manual.NewBuilderWithScheme(testResName) - cc, err := grpc.Dial(testResName+":///", + cc, err := grpc.NewClient(testResName+":///", grpc.WithResolvers(rb), grpc.WithDefaultServiceConfig(fmt.Sprintf(`{"loadBalancingConfig": [{"%s":{}}]}`, testBalName)), grpc.WithTransportCredentials(insecure.NewCredentials()), ) if err != nil { - t.Fatalf("Unexpected error from grpc.Dial: %v", err) + t.Fatalf("Failed to create a client for server: %v", err) } - + cc.Connect() // Subscribe to state updates. Use a buffer size of 1 to allow the // Shutdown state to go into the channel when Close()ing. connCh := make(chan connectivity.State, 1) diff --git a/test/goaway_test.go b/test/goaway_test.go index 65d2cc02d05a..f9aed94d91a3 100644 --- a/test/goaway_test.go +++ b/test/goaway_test.go @@ -587,7 +587,7 @@ func (s) TestGoAwayThenClose(t *testing.T) { {Addr: lis1.Addr().String()}, {Addr: lis2.Addr().String()}, }}) - cc, err := grpc.DialContext(ctx, r.Scheme()+":///", grpc.WithResolvers(r), grpc.WithTransportCredentials(insecure.NewCredentials())) + cc, err := grpc.NewClient(r.Scheme()+":///", grpc.WithResolvers(r), grpc.WithTransportCredentials(insecure.NewCredentials())) if err != nil { t.Fatalf("Error creating client: %v", err) } @@ -595,9 +595,6 @@ func (s) TestGoAwayThenClose(t *testing.T) { client := testgrpc.NewTestServiceClient(cc) - t.Log("Waiting for the ClientConn to enter READY state.") - testutils.AwaitState(ctx, t, cc, connectivity.Ready) - // We make a streaming RPC and do an one-message-round-trip to make sure // it's created on connection 1. // @@ -672,12 +669,12 @@ func (s) TestGoAwayStreamIDSmallerThanCreatedStreams(t *testing.T) { ctCh.Send(ct) }() - cc, err := grpc.Dial(lis.Addr().String(), grpc.WithTransportCredentials(insecure.NewCredentials())) + cc, err := grpc.NewClient(lis.Addr().String(), grpc.WithTransportCredentials(insecure.NewCredentials())) if err != nil { - t.Fatalf("error dialing: %v", err) + t.Fatalf("Failed to create a client for server: %v", err) } defer cc.Close() - + cc.Connect() ctx, cancel := context.WithTimeout(context.Background(), defaultTestTimeout) defer cancel() diff --git a/test/gracefulstop_test.go b/test/gracefulstop_test.go index a1e968e8deb0..c5b32fd2a7b8 100644 --- a/test/gracefulstop_test.go +++ b/test/gracefulstop_test.go @@ -148,11 +148,9 @@ func (s) TestGracefulStop(t *testing.T) { // Now dial. The listener's Accept method will return a valid connection, // even though GracefulStop has closed the listener. - ctx, dialCancel := context.WithTimeout(context.Background(), defaultTestTimeout) - defer dialCancel() - cc, err := grpc.DialContext(ctx, "", grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithContextDialer(d)) + cc, err := grpc.NewClient("passthrough:///:", grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithContextDialer(d)) if err != nil { - t.Fatalf("grpc.DialContext(_, %q, _) = %v", lis.Addr().String(), err) + t.Fatalf("grpc.NewClient(_, %q, _) = %v", lis.Addr().String(), err) } client := testgrpc.NewTestServiceClient(cc) defer cc.Close() diff --git a/test/xds/xds_client_federation_test.go b/test/xds/xds_client_federation_test.go index f94f2c182f44..86d0258a93b9 100644 --- a/test/xds/xds_client_federation_test.go +++ b/test/xds/xds_client_federation_test.go @@ -136,7 +136,7 @@ func (s) TestClientSideFederation(t *testing.T) { // Create a ClientConn and make a successful RPC. cc, err := grpc.NewClient(fmt.Sprintf("xds:///%s", serviceName), grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithResolvers(resolver)) if err != nil { - t.Fatalf("failed to dial local test server: %v", err) + t.Fatalf("Failed to create a client for server: %v", err) } defer cc.Close() @@ -230,7 +230,7 @@ func (s) TestClientSideFederationWithOnlyXDSTPStyleLDS(t *testing.T) { // Create a ClientConn and make a successful RPC. cc, err := grpc.NewClient(fmt.Sprintf("xds:///%s", serviceName), grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithResolvers(resolver)) if err != nil { - t.Fatalf("failed to dial local test server: %v", err) + t.Fatalf("Failed to create a client for server: %v", err) } defer cc.Close() @@ -274,7 +274,7 @@ func (s) TestFederation_UnknownAuthorityInDialTarget(t *testing.T) { target := fmt.Sprintf("xds:///%s", serviceName) cc, err := grpc.NewClient(target, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithResolvers(xdsResolver)) if err != nil { - t.Fatalf("Dialing target %q: %v", target, err) + t.Fatalf("Failed to create a client for server %q: %v", target, err) } defer cc.Close() t.Log("Created ClientConn to test service") @@ -323,7 +323,7 @@ func (s) TestFederation_UnknownAuthorityInReceivedResponse(t *testing.T) { target := fmt.Sprintf("xds:///%s", serviceName) cc, err := grpc.NewClient(target, grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithResolvers(xdsResolver)) if err != nil { - t.Fatalf("Dialing target %q: %v", target, err) + t.Fatalf("Failed to create a client for server %q: %v", target, err) } defer cc.Close() t.Log("Created ClientConn to test service") diff --git a/test/xds/xds_security_config_nack_test.go b/test/xds/xds_security_config_nack_test.go index d14f9821411d..cf99a8994eaf 100644 --- a/test/xds/xds_security_config_nack_test.go +++ b/test/xds/xds_security_config_nack_test.go @@ -191,9 +191,9 @@ func (s) TestUnmarshalListener_WithUpdateValidatorFunc(t *testing.T) { } // Create a ClientConn with the xds scheme and make an RPC. - cc, err := grpc.DialContext(ctx, fmt.Sprintf("xds:///%s", serviceName), grpc.WithTransportCredentials(creds), grpc.WithResolvers(xdsResolver)) + cc, err := grpc.NewClient(fmt.Sprintf("xds:///%s", serviceName), grpc.WithTransportCredentials(creds), grpc.WithResolvers(xdsResolver)) if err != nil { - t.Fatalf("failed to dial local test server: %v", err) + t.Fatalf("Failed to create a client for server: %v", err) } defer cc.Close() diff --git a/test/xds/xds_server_rbac_test.go b/test/xds/xds_server_rbac_test.go index f05cd05e5fd9..cf5798811599 100644 --- a/test/xds/xds_server_rbac_test.go +++ b/test/xds/xds_server_rbac_test.go @@ -245,9 +245,9 @@ func (s) TestServerSideXDS_RouteConfiguration(t *testing.T) { t.Fatal(err) } - cc, err := grpc.DialContext(ctx, fmt.Sprintf("xds:///%s", serviceName), grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithResolvers(xdsResolver)) + cc, err := grpc.NewClient(fmt.Sprintf("xds:///%s", serviceName), grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithResolvers(xdsResolver)) if err != nil { - t.Fatalf("failed to dial local test server: %v", err) + t.Fatalf("Failed to create a client for server: %v", err) } defer cc.Close() @@ -678,9 +678,9 @@ func (s) TestRBACHTTPFilter(t *testing.T) { t.Fatal(err) } - cc, err := grpc.DialContext(ctx, fmt.Sprintf("xds:///%s", serviceName), grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithResolvers(xdsResolver)) + cc, err := grpc.NewClient(fmt.Sprintf("xds:///%s", serviceName), grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithResolvers(xdsResolver)) if err != nil { - t.Fatalf("failed to dial local test server: %v", err) + t.Fatalf("Failed to create a client for server: %v", err) } defer cc.Close() @@ -860,9 +860,9 @@ func (s) TestRBACToggledOn_WithBadRouteConfiguration(t *testing.T) { t.Fatal(err) } - cc, err := grpc.DialContext(ctx, fmt.Sprintf("xds:///%s", serviceName), grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithResolvers(xdsResolver)) + cc, err := grpc.NewClient(fmt.Sprintf("xds:///%s", serviceName), grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithResolvers(xdsResolver)) if err != nil { - t.Fatalf("failed to dial local test server: %v", err) + t.Fatalf("Failed to create a client for server: %v", err) } defer cc.Close() diff --git a/test/xds/xds_server_serving_mode_test.go b/test/xds/xds_server_serving_mode_test.go index 0299d6954ddb..a96a0c1d4de0 100644 --- a/test/xds/xds_server_serving_mode_test.go +++ b/test/xds/xds_server_serving_mode_test.go @@ -26,6 +26,7 @@ import ( "time" "google.golang.org/grpc" + "google.golang.org/grpc/codes" "google.golang.org/grpc/connectivity" "google.golang.org/grpc/credentials" "google.golang.org/grpc/credentials/insecure" @@ -34,6 +35,7 @@ import ( "google.golang.org/grpc/internal/testutils" "google.golang.org/grpc/internal/testutils/xds/e2e" "google.golang.org/grpc/internal/testutils/xds/e2e/setup" + "google.golang.org/grpc/status" "google.golang.org/grpc/xds" v3listenerpb "github.com/envoyproxy/go-control-plane/envoy/config/listener/v3" @@ -247,7 +249,7 @@ func (s) TestServerSideXDS_ServingModeChanges(t *testing.T) { // Create a ClientConn to the first listener and make a successful RPCs. cc1, err := grpc.NewClient(lis1.Addr().String(), grpc.WithTransportCredentials(insecure.NewCredentials())) if err != nil { - t.Fatalf("failed to dial local test server: %v", err) + t.Fatalf("Failed to create a client for server: %v", err) } defer cc1.Close() waitForSuccessfulRPC(ctx, t, cc1) @@ -255,7 +257,7 @@ func (s) TestServerSideXDS_ServingModeChanges(t *testing.T) { // Create a ClientConn to the second listener and make a successful RPCs. cc2, err := grpc.NewClient(lis2.Addr().String(), grpc.WithTransportCredentials(insecure.NewCredentials())) if err != nil { - t.Fatalf("failed to dial local test server: %v", err) + t.Fatalf("Failed to create a client for server: %v", err) } defer cc2.Close() waitForSuccessfulRPC(ctx, t, cc2) @@ -309,12 +311,15 @@ func (s) TestServerSideXDS_ServingModeChanges(t *testing.T) { waitForFailedRPC(ctx, t, cc1) waitForFailedRPC(ctx, t, cc2) - // Make sure new connection attempts to "not-serving" servers fail. We use a - // short timeout since we expect this to fail. - sCtx, sCancel := context.WithTimeout(ctx, defaultTestShortTimeout) - defer sCancel() - if _, err := grpc.DialContext(sCtx, lis1.Addr().String(), grpc.WithBlock(), grpc.WithTransportCredentials(insecure.NewCredentials())); err == nil { - t.Fatal("successfully created clientConn to a server in \"not-serving\" state") + // Make sure new connection attempts to "not-serving" servers fail. + if cc1, err = grpc.NewClient(lis1.Addr().String(), grpc.WithBlock(), grpc.WithTransportCredentials(insecure.NewCredentials())); err != nil { + t.Fatal("Failed to create clientConn to a server in \"not-serving\" state") + } + defer cc1.Close() + + _, err = testgrpc.NewTestServiceClient(cc1).FullDuplexCall(ctx) + if err == nil || status.Code(err) != codes.Unavailable { + t.Fatalf("Expected FullDuplexCall to fail with status code Unavailable, got: %v", err) } // Update the management server with both listener resources. diff --git a/xds/internal/balancer/cdsbalancer/cdsbalancer_security_test.go b/xds/internal/balancer/cdsbalancer/cdsbalancer_security_test.go index cb6eff0cd1c8..be8e2c942247 100644 --- a/xds/internal/balancer/cdsbalancer/cdsbalancer_security_test.go +++ b/xds/internal/balancer/cdsbalancer/cdsbalancer_security_test.go @@ -162,9 +162,9 @@ func setupForSecurityTests(t *testing.T, bootstrapContents []byte, clientCreds, r.InitialState(state) // Create a ClientConn with the specified transport credentials. - cc, err := grpc.Dial(r.Scheme()+":///test.service", grpc.WithTransportCredentials(clientCreds), grpc.WithResolvers(r)) + cc, err := grpc.NewClient(r.Scheme()+":///test.service", grpc.WithTransportCredentials(clientCreds), grpc.WithResolvers(r)) if err != nil { - t.Fatalf("Failed to dial local test server: %v", err) + t.Fatalf("Failed to create a client for server: %v", err) } t.Cleanup(func() { cc.Close() }) @@ -388,7 +388,7 @@ func (s) TestSecurityConfigNotFoundInBootstrap(t *testing.T) { // Create a grpc channel with xDS creds. cc, _ := setupForSecurityTests(t, bootstrapContents, xdsClientCredsWithInsecureFallback(t), nil) - + cc.Connect() // Configure a cluster resource that contains security configuration, in the // management server. resources := e2e.UpdateOptions{ @@ -455,6 +455,7 @@ func (s) TestCertproviderStoreError(t *testing.T) { // Create a grpc channel with xDS creds. cc, _ := setupForSecurityTests(t, bootstrapContents, xdsClientCredsWithInsecureFallback(t), nil) + cc.Connect() // Configure a cluster resource that contains security configuration, in the // management server. @@ -530,6 +531,7 @@ func (s) TestSecurityConfigUpdate_BadToGood(t *testing.T) { // Create a grpc channel with xDS creds talking to a test server with TLS // credentials. cc, serverAddress := setupForSecurityTests(t, bc, xdsClientCredsWithInsecureFallback(t), tlsServerCreds(t)) + defer cc.Close() // Configure cluster and endpoints resources in the management server. The // cluster resource contains security configuration with a certificate @@ -558,9 +560,14 @@ func (s) TestSecurityConfigUpdate_BadToGood(t *testing.T) { ctx, cancel := context.WithTimeout(context.Background(), defaultTestTimeout) defer cancel() if err := mgmtServer.Update(ctx, resources); err != nil { - t.Fatal(err) + t.Fatalf("Failed to update management server with initial resources: %v", err) } + client := testgrpc.NewTestServiceClient(cc) + go func() { + _, _ = client.EmptyCall(ctx, &testpb.Empty{}, grpc.WaitForReady(true)) + }() + testutils.AwaitState(ctx, t, cc, connectivity.TransientFailure) // Update the management server with a Cluster resource that contains a @@ -573,11 +580,11 @@ func (s) TestSecurityConfigUpdate_BadToGood(t *testing.T) { SkipValidation: true, } if err := mgmtServer.Update(ctx, resources); err != nil { - t.Fatal(err) + t.Fatalf("Failed to update management server with valid resources: %v", err) } - // Verify that a successful RPC can be made over a secure connection. - client := testgrpc.NewTestServiceClient(cc) + testutils.AwaitState(ctx, t, cc, connectivity.Ready) + peer := &peer.Peer{} if _, err := client.EmptyCall(ctx, &testpb.Empty{}, grpc.WaitForReady(true), grpc.Peer(peer)); err != nil { t.Fatalf("EmptyCall() failed: %v", err) diff --git a/xds/internal/balancer/cdsbalancer/cdsbalancer_test.go b/xds/internal/balancer/cdsbalancer/cdsbalancer_test.go index 9c17cee62cdf..df32c061e941 100644 --- a/xds/internal/balancer/cdsbalancer/cdsbalancer_test.go +++ b/xds/internal/balancer/cdsbalancer/cdsbalancer_test.go @@ -261,10 +261,11 @@ func setupWithManagementServerAndListener(t *testing.T, lis net.Listener) (*e2e. scpr := internal.ParseServiceConfig.(func(string) *serviceconfig.ParseResult)(jsonSC) r.InitialState(xdsclient.SetClient(resolver.State{ServiceConfig: scpr}, xdsC)) - cc, err := grpc.Dial(r.Scheme()+":///test.service", grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithResolvers(r)) + cc, err := grpc.NewClient(r.Scheme()+":///test.service", grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithResolvers(r)) if err != nil { - t.Fatalf("Failed to dial local test server: %v", err) + t.Fatalf("Failed to create a client for server: %v", err) } + cc.Connect() t.Cleanup(func() { cc.Close() }) return mgmtServer, nodeID, cc, r, xdsC, cdsResourceRequestedCh, cdsResourceCanceledCh @@ -392,10 +393,11 @@ func (s) TestConfigurationUpdate_EmptyCluster(t *testing.T) { r.InitialState(xdsclient.SetClient(resolver.State{ServiceConfig: scpr}, xdsClient)) // Create a ClientConn with the above manual resolver. - cc, err := grpc.Dial(r.Scheme()+":///test.service", grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithResolvers(r)) + cc, err := grpc.NewClient(r.Scheme()+":///test.service", grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithResolvers(r)) if err != nil { - t.Fatalf("Failed to dial: %v", err) + t.Fatalf("Failed to create a client for server: %v", err) } + cc.Connect() t.Cleanup(func() { cc.Close() }) select { @@ -429,10 +431,11 @@ func (s) TestConfigurationUpdate_MissingXdsClient(t *testing.T) { r.InitialState(resolver.State{ServiceConfig: scpr}) // Create a ClientConn with the above manual resolver. - cc, err := grpc.Dial(r.Scheme()+":///test.service", grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithResolvers(r)) + cc, err := grpc.NewClient(r.Scheme()+":///test.service", grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithResolvers(r)) if err != nil { - t.Fatalf("Failed to dial: %v", err) + t.Fatalf("failed to create a client for server: %v", err) } + cc.Connect() t.Cleanup(func() { cc.Close() }) select { diff --git a/xds/internal/balancer/clusterresolver/e2e_test/balancer_test.go b/xds/internal/balancer/clusterresolver/e2e_test/balancer_test.go index 2d934ef3ae10..8f2903899670 100644 --- a/xds/internal/balancer/clusterresolver/e2e_test/balancer_test.go +++ b/xds/internal/balancer/clusterresolver/e2e_test/balancer_test.go @@ -97,11 +97,12 @@ func setupAndDial(t *testing.T, bootstrapContents []byte) (*grpc.ClientConn, fun r.InitialState(xdsclient.SetClient(resolver.State{ServiceConfig: scpr}, xdsC)) // Create a ClientConn and make a successful RPC. - cc, err := grpc.Dial(r.Scheme()+":///test.service", grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithResolvers(r)) + cc, err := grpc.NewClient(r.Scheme()+":///test.service", grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithResolvers(r)) if err != nil { xdsClose() - t.Fatalf("Failed to dial local test server: %v", err) + t.Fatalf("Failed to create a client for server: %v", err) } + cc.Connect() return cc, func() { xdsClose() cc.Close() diff --git a/xds/internal/balancer/clusterresolver/e2e_test/eds_impl_test.go b/xds/internal/balancer/clusterresolver/e2e_test/eds_impl_test.go index e75cf1970de2..7f3b933f3458 100644 --- a/xds/internal/balancer/clusterresolver/e2e_test/eds_impl_test.go +++ b/xds/internal/balancer/clusterresolver/e2e_test/eds_impl_test.go @@ -803,7 +803,7 @@ func (s) TestEDS_ClusterResourceUpdates(t *testing.T) { SkipValidation: true, } if err := managementServer.Update(ctx, resources); err != nil { - t.Fatal(err) + t.Fatalf("Failed to update management server resources: %v", err) } // Create xDS client, configure cds_experimental LB policy with a manual @@ -833,7 +833,7 @@ func (s) TestEDS_ClusterResourceUpdates(t *testing.T) { // Change the cluster resource to not contain an eds_service_name. resources.Clusters = []*v3clusterpb.Cluster{e2e.DefaultCluster(clusterName, "", e2e.SecurityLevelNone)} if err := managementServer.Update(ctx, resources); err != nil { - t.Fatal(err) + t.Fatalf("Failed to update cluster resources: %v", err) } // Ensure that an EDS watch for eds_service_name is canceled and new watch @@ -876,7 +876,7 @@ func (s) TestEDS_ClusterResourceUpdates(t *testing.T) { }, } if err := managementServer.Update(ctx, resources); err != nil { - t.Fatal(err) + t.Fatalf("Failed to update cluster circuit breakers: %v", err) } // Ensure that RPCs continue to get routed to the second backend for the