Skip to content

Commit ea33d9f

Browse files
authored
refactor: migrate calls to deprecated grpc.Dial (#4376)
1 parent 5062b66 commit ea33d9f

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

core/server/suite_test.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,8 @@ func makeGRPCServer(ctx context.Context, cfg *rest.Config, t *testing.T) pb.Core
109109
}
110110
}(t)
111111

112-
//nolint:staticcheck // Ignore SA1019 deprecation warning for grpc.Dial
113-
conn, err := grpc.Dial(
114-
"bufnet",
112+
conn, err := grpc.NewClient(
113+
"passthrough://bufnet",
115114
grpc.WithContextDialer(dialer),
116115
grpc.WithTransportCredentials(insecure.NewCredentials()),
117116
)
@@ -237,9 +236,8 @@ func dialBufnet(t *testing.T, lis *bufconn.Listener) *grpc.ClientConn {
237236
return lis.Dial()
238237
}
239238

240-
//nolint:staticcheck // Ignore SA1019 deprecation warning for grpc.Dial
241-
conn, err := grpc.Dial(
242-
"bufnet", // The address is ignored when using WithContextDialer
239+
conn, err := grpc.NewClient(
240+
"passthrough://bufnet",
243241
grpc.WithContextDialer(dialer),
244242
grpc.WithTransportCredentials(insecure.NewCredentials()), // Insecure for testing
245243
)

0 commit comments

Comments
 (0)