From 3c6d2e972d46abafefd51342977e201a478f7946 Mon Sep 17 00:00:00 2001 From: Chao Chen Date: Tue, 17 Oct 2023 15:51:25 -0700 Subject: [PATCH] remove deprecated gRPC API usage Signed-off-by: Chao Chen --- tests/integration/clientv3/naming/resolver_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/integration/clientv3/naming/resolver_test.go b/tests/integration/clientv3/naming/resolver_test.go index 814ed7768..effb0b74e 100644 --- a/tests/integration/clientv3/naming/resolver_test.go +++ b/tests/integration/clientv3/naming/resolver_test.go @@ -23,6 +23,7 @@ import ( "github.com/stretchr/testify/assert" "google.golang.org/grpc" + "google.golang.org/grpc/credentials/insecure" testpb "google.golang.org/grpc/interop/grpc_testing" "go.etcd.io/etcd/client/v3/naming/endpoints" @@ -75,7 +76,7 @@ func testEtcdGrpcResolver(t *testing.T, lbPolicy string) { } // Create connection with provided lb policy - conn, err := grpc.Dial("etcd:///foo", grpc.WithInsecure(), grpc.WithResolvers(b), + conn, err := grpc.Dial("etcd:///foo", grpc.WithTransportCredentials(insecure.NewCredentials()), grpc.WithResolvers(b), grpc.WithDefaultServiceConfig(fmt.Sprintf(`{"loadBalancingPolicy":"%s"}`, lbPolicy))) if err != nil { t.Fatal("failed to connect to foo", err)