diff --git a/examples/grpc/grpc_consumer_test.go b/examples/grpc/grpc_consumer_test.go index 44fdd8640..9efec964d 100644 --- a/examples/grpc/grpc_consumer_test.go +++ b/examples/grpc/grpc_consumer_test.go @@ -60,7 +60,7 @@ func TestGetFeatureSuccess(t *testing.T) { fmt.Println("gRPC transport running on", transport) // Establish the gRPC connection - conn, err := grpc.Dial(fmt.Sprintf("127.0.0.1:%d", transport.Port), grpc.WithTransportCredentials(insecure.NewCredentials())) + conn, err := grpc.NewClient(fmt.Sprintf("127.0.0.1:%d", transport.Port), grpc.WithTransportCredentials(insecure.NewCredentials())) if err != nil { t.Fatal("unable to communicate to grpc server", err) } @@ -130,7 +130,7 @@ func TestGetFeatureError(t *testing.T) { fmt.Println("gRPC transport running on", transport) // Establish the gRPC connection - conn, err := grpc.Dial(fmt.Sprintf("127.0.0.1:%d", transport.Port), grpc.WithTransportCredentials(insecure.NewCredentials())) + conn, err := grpc.NewClient(fmt.Sprintf("127.0.0.1:%d", transport.Port), grpc.WithTransportCredentials(insecure.NewCredentials())) require.NoError(t, err) defer conn.Close() @@ -201,7 +201,7 @@ func TestSaveFeature(t *testing.T) { fmt.Println("gRPC transport running on", transport) // Establish the gRPC connection - conn, err := grpc.Dial(fmt.Sprintf("127.0.0.1:%d", transport.Port), grpc.WithTransportCredentials(insecure.NewCredentials())) + conn, err := grpc.NewClient(fmt.Sprintf("127.0.0.1:%d", transport.Port), grpc.WithTransportCredentials(insecure.NewCredentials())) if err != nil { t.Fatal("unable to communicate to grpc server", err) } diff --git a/internal/native/message_server_test.go b/internal/native/message_server_test.go index 3c39cb607..f1a18dad7 100644 --- a/internal/native/message_server_test.go +++ b/internal/native/message_server_test.go @@ -397,7 +397,7 @@ func TestGrpcPluginInteraction(t *testing.T) { } // Need to make a gRPC call here - conn, err := grpc.Dial(fmt.Sprintf("127.0.0.1:%d", port), grpc.WithTransportCredentials(insecure.NewCredentials())) + conn, err := grpc.NewClient(fmt.Sprintf("127.0.0.1:%d", port), grpc.WithTransportCredentials(insecure.NewCredentials())) if err != nil { l.Fatalf("did not connect: %v", err) } @@ -470,7 +470,7 @@ func TestGrpcPluginInteraction_ErrorResponse(t *testing.T) { } // Need to make a gRPC call here - conn, err := grpc.Dial(fmt.Sprintf("127.0.0.1:%d", port), grpc.WithTransportCredentials(insecure.NewCredentials())) + conn, err := grpc.NewClient(fmt.Sprintf("127.0.0.1:%d", port), grpc.WithTransportCredentials(insecure.NewCredentials())) if err != nil { l.Fatalf("did not connect: %v", err) }