You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "yyqdbngt (via GitHub)" <gi...@apache.org> on 2026/09/05 13:03:31 UTC

[PR] test(tool): cover AlertRuleListToolHandler delegation and projection [rocketmq-dashboard]

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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] test(tool): cover AlertRuleListToolHandler delegation and projection [rocketmq-dashboard]

Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins closed pull request #3330: test(tool): cover AlertRuleListToolHandler delegation and projection
URL: https://github.com/apache/rocketmq-dashboard/pull/3330


-- 
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: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org