Skip to content

[Test🧪] Add no-op branch tests for ZoneRouteRPCHook #7615

Description

@mxsm

Prerequisites

  • I have searched existing test issues

Test Scope

Module: zone-aware topic route filtering
File: rocketmq-namesrv/src/route/zone_route_rpc_hook.rs
Coverage: the existing tests cover successful filtering and JSON encoding; add low-risk branch coverage for requests and responses that should not be modified.

Test Cases

  • Non-GetRouteinfoByTopic request leaves the response body unchanged.
  • Non-success response leaves the response body unchanged.
  • Missing or false zoneMode leaves the response body unchanged.
  • Missing or empty zoneName leaves the response body unchanged.
  • Zone matching remains case-insensitive for filter_by_zone_name.
  • Validate with cargo test -p rocketmq-namesrv zone_route_rpc_hook.

Willing to contribute?

  • I can submit a PR for this

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions