zjncs opened a new pull request, #5675:
URL: https://github.com/apache/rocketmq-dashboard/pull/5675

   ### Problem
   
   `TopicDetailOutput` — the aggregated describe output of the AI topic-detail 
tool — had **no test**.
   
   ### Change
   
   Add `TopicDetailOutputTest` with seven tests pinning:
   
   | Contract | Pinned behaviour |
   | --- | --- |
   | field round-trip | every topic field maps from the source `TopicVO` |
   | absent blocks | null consumer/route lists become **empty lists**, never 
null (absent blocks render as `[]`) |
   | queue stats | empty **or** absent queue stats stay **null** so `NON_NULL` 
JSON rendering omits the block — deliberately distinct from the empty-list 
contract of consumers/routes |
   | defensive copy | present queue stats are copied into an immutable list; 
mutating the source afterwards changes nothing |
   | consumer groups | carry `metricsAvailable` verbatim; a null `consumeType` 
stays null (omitted) instead of being stringified |
   | routes | the permission renders both as its enum name and its numeric 
code; a null permission stays null instead of failing |
   
   ### Verification
   
   - New tests: **7/7 green** against unmodified code.
   - Discriminating mutations on `TopicDetailOutput` (build result verified): 
null lists rendered as null (**red**); empty queue stats rendered as an empty 
list (**red**); the defensive copy dropped (**red**); null consumeType 
stringified (**red**).
   - Restored: 7/7 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]

Reply via email to