Skip to content

Commit

Permalink
.*: fix minor linter issues (#6958)
Browse files Browse the repository at this point in the history
  • Loading branch information
arvindbr8 authored Feb 1, 2024
1 parent 891f8da commit cd69b5d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
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

0 comments on commit cd69b5d

Please sign in to comment.