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

   ### What
   
   `MessageItem` — one message row of a query result listing — had no test. 
This adds `MessageItemTest` with 3 tests.
   
   ### What is pinned
   
   - every message field maps through: identity, topic, tag and key, the store 
timestamp, both hosts, the body with its encoding and size;
   - **a truncated body carries its flag** — `bodyTruncated` is what tells the 
consumer the body is a prefix capped by the transport limit, not the whole 
payload;
   - optional fields stay null rather than acquiring defaults.
   
   ### Verification
   
   - New tests on unmodified code: **3/3 green**, checkstyle clean (`mvn test 
-Dtest=MessageItemTest`).
   - Discriminating mutations on `MessageItem`, build result verified red each 
time:
     1. the truncation flag inverted so capped prefixes read as complete — red;
     2. the store and born hosts swapped — red;
     3. the size replaced by the body character length so a capped body reports 
the prefix length as the message size — red.
   - Restored: 3/3 green. Test-only change; no product code touched.
   


-- 
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