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

   ## Summary
   
   Adds `AlertRuleListToolHandlerTest`, a first unit test for the 
`rmq.alert.rule.list` list-style AI tool handler. `AlertService` is mocked.
   
   Coverage:
   - the tool reports its canonical name `rmq.alert.rule.list`;
   - a successful execution delegates with search/enabled and the page window, 
and projects each rule row (id, name, metric, operator, threshold, blank 
threshold unit, duration, channels, enabled, description) into the paged 
envelope;
   - absent optional filters and paging inputs default to null/null/1/20;
   - a rule missing a required projection field (`metric`) is rejected with an 
`IllegalStateException` naming the field.
   
   ## Why
   
   The tool exposes the alert-rule inventory to AI/MCP/CLI callers; it had no 
direct test while the topic/group list siblings were covered.
   
   ## Testing
   
   `mvn -B test -Dtest=AlertRuleListToolHandlerTest` — 4/4 pass; checkstyle 
(validate) clean.


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