Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.*: fix minor linter issues #6958

Merged
merged 1 commit into from
Feb 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions interop/client/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -349,10 +349,10 @@ func main() {
interop.DoCustomMetadata(ctx, tc)
logger.Infoln("CustomMetadata done")
case "unimplemented_method":
interop.DoUnimplementedMethod(conn, ctx)
interop.DoUnimplementedMethod(ctx, conn)
logger.Infoln("UnimplementedMethod done")
case "unimplemented_service":
interop.DoUnimplementedService(testgrpc.NewUnimplementedServiceClient(conn), ctx)
interop.DoUnimplementedService(ctx, testgrpc.NewUnimplementedServiceClient(conn))
logger.Infoln("UnimplementedService done")
case "pick_first_unary":
interop.DoPickFirstUnary(ctx, tc)
Expand Down
4 changes: 2 additions & 2 deletions interop/test_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -634,15 +634,15 @@ func DoSpecialStatusMessage(ctx context.Context, tc testgrpc.TestServiceClient,
}

// DoUnimplementedService attempts to call a method from an unimplemented service.
func DoUnimplementedService(tc testgrpc.UnimplementedServiceClient, ctx context.Context) {
func DoUnimplementedService(ctx context.Context, tc testgrpc.UnimplementedServiceClient) {
_, err := tc.UnimplementedCall(ctx, &testpb.Empty{})
if status.Code(err) != codes.Unimplemented {
logger.Fatalf("%v.UnimplementedCall() = _, %v, want _, %v", tc, status.Code(err), codes.Unimplemented)
}
}

// DoUnimplementedMethod attempts to call an unimplemented method.
func DoUnimplementedMethod(cc *grpc.ClientConn, ctx context.Context) {
func DoUnimplementedMethod(ctx context.Context, cc *grpc.ClientConn) {
var req, reply proto.Message
if err := cc.Invoke(ctx, "/grpc.testing.TestService/UnimplementedCall", req, reply); err == nil || status.Code(err) != codes.Unimplemented {
logger.Fatalf("ClientConn.Invoke(_, _, _, _, _) = %v, want error code %s", err, codes.Unimplemented)
Expand Down
2 changes: 1 addition & 1 deletion vet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ if [[ "$1" = "-install" ]]; then
popd
if [[ -z "${VET_SKIP_PROTO}" ]]; then
if [[ "${GITHUB_ACTIONS}" = "true" ]]; then
PROTOBUF_VERSION=25.2 # a.k.a v4.22.0 in pb.go files.
PROTOBUF_VERSION=25.2 # a.k.a. v4.22.0 in pb.go files.
PROTOC_FILENAME=protoc-${PROTOBUF_VERSION}-linux-x86_64.zip
pushd /home/runner/go
wget https://github.com/google/protobuf/releases/download/v${PROTOBUF_VERSION}/${PROTOC_FILENAME}
Expand Down