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

   ### What
   
   `BrokerConfigOutput` — the projection of a broker config drift scan into the 
tool contract — had no test. This adds `BrokerConfigOutputTest` with 4 tests.
   
   ### Why
   
   The null-safe list handling is the contract: the scan legitimately produces 
no brokers (an unreachable cluster) or no differences (a consistent cluster), 
and the tool contract promises empty lists, never nulls. The reachability 
message of an unreachable broker is the operator's one line of diagnosis. None 
of it was pinned.
   
   ### What is pinned
   
   - the drift verdict, the broker/reachable counts, the compared fields and 
the nested per-broker values all map through, including the **reachability 
message** of an unreachable broker;
   - a scan with **no broker list** projects to an empty list, never a null;
   - a scan with **no differences** likewise;
   - a difference whose **value list is missing** projects to an empty value 
list.
   
   ### Verification
   
   - New tests on unmodified code: **4/4 green**, checkstyle clean (`mvn test 
-Dtest=BrokerConfigOutputTest`).
   - Discriminating mutations on `BrokerConfigOutput`, build result verified 
red each time:
     1. the brokers null guard dropped — red;
     2. the nested values null guard dropped — red;
     3. the reachability message dropped from `BrokerStatus` — red.
   - Restored: 4/4 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