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

   ### Summary
   Guard and cover the metrics source factory:
   
   - `MetricsSourceFactory.create` rejects a null configuration with a clear 
400 (`metrics data source config is required`) instead of NPE-ing on 
`config.getProviderType()`.
   - New `MetricsSourceFactoryTest` (first coverage) verifies the null guard 
and that a padded `prometheus` provider type builds a `PrometheusMetricsSource` 
(backend normalization).
   
   ### Why
   The factory builds every Prometheus-compatible backend and had no automated 
coverage; a null config previously crashed with an opaque NPE.
   
   ### Testing
   - `mvn -f server/pom.xml -Dtest=MetricsSourceFactoryTest test` passes: 2/2.
   


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