zjncs opened a new pull request, #5687: URL: https://github.com/apache/rocketmq-dashboard/pull/5687
### Problem `TopicRouteToolHandler` — the `rmq.topic.route` read tool — had **no test**. ### Change Add `TopicRouteToolHandlerTest` with five tests: | Contract | Pinned behaviour | | --- | --- | | fetch scope | the routes are fetched under the **context's instance** and the input's topic name; every route maps into the output list in order | | field mapping | every route field renders through the item mapping — broker name and addresses, permission both as its enum name and numeric code, readable/writable flags, the broker address map, broker ids, replica count and the topic system flag | | null permission | a null route permission renders as null (omitted from JSON) instead of failing the mapping | | empty list | an empty route list produces an empty output, never null | | identity | the tool name and input type round-trip | ### Verification - New tests: **5/5 green** against unmodified code. - Discriminating mutations (build result verified): the routes fetched without the instance id (**red**); the null-permission branch stringified (**red**); brokerIds dropped from the item mapping (**red** — chosen after an initial mutation target proved untestable and was replaced). - Restored: 5/5 green. No product code changed. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
