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

   ### What
   
   `MetricsSourceFactory` — the selection of a metrics backend from a data 
source configuration — had no test. This adds `MetricsSourceFactoryTest` with 4 
tests.
   
   ### What is pinned
   
   - **every provider type selects its own implementation**: Prometheus, 
VictoriaMetrics, Thanos, Cortex, Mimir and ARMS each get their source class;
   - an unknown provider type falls back to the Prometheus source;
   - the created source carries the configured connection: the base URL, the 
backend type, the auth values, and the operational budget the factory hardcodes 
(3s connect / 10s read) with the backend's own query path;
   - the query path matches the **selected** backend, not a global default.
   
   ### Verification
   
   - New tests on unmodified code: **4/4 green**, checkstyle clean (`mvn test 
-Dtest=MetricsSourceFactoryTest`).
   - Discriminating mutations on `MetricsSourceFactory`, build result verified 
red each time:
     1. the THANOS arm wired to the Cortex implementation — red;
     2. the connect budget relaxed from 3s to 30s — red;
     3. the auth fields dropped so every source is built unauthenticated — 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