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

   ### What
   
   `MetricProfile` — the profile vocabulary instance and cluster metric 
configuration is matched by — had no test. This adds `MetricProfileTest` with 4 
tests pinning its wire vocabulary.
   
   ### Why
   
   The ids are wire identifiers: a renamed id silently detaches a cluster from 
its metric profile, and a duplicated one makes the two generations 
indistinguishable to configuration matching. None of it was pinned.
   
   ### What is pinned
   
   - the two stable wire ids, `rocketmq4-exporter` and `rocketmq5-native`;
   - the two display names, one per supported generation;
   - the two descriptions, which explain the scraping path of each;
   - **exactly two profiles with distinct ids** — a third value would change 
the profile matrix every consumer iterates over.
   
   ### Verification
   
   - New tests on unmodified code: **4/4 green** (`mvn test 
-Dtest=MetricProfileTest`).
   - Discriminating mutations on `MetricProfile`, build result verified red 
each time:
     1. the 4.x wire id renamed (`rocketmq4-exporter` → `rocketmq-exporter`) — 
red;
     2. the 5.x display name truncated — red;
     3. the 5.x id duplicated onto the 4.x id — red, caught by both the id pin 
and the distinct-ids test.
   - 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