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

   ## Summary
   
   Extends the existing `AlertRuleRequestDTOTest` (4 to 7 tests) to pin down 
the alert-rule request validation contract.
   
   Added cases:
   - invalid operators, durations, aggregations, severities, a negative window, 
zero consecutive samples, and a blank name are each rejected with their 
dedicated messages;
   - `toAlertRuleVO` fills sensible defaults for omitted optionals (aggregation 
`LAST`, window 0, consecutive samples 1, reminder `30m`, null metric);
   - case-insensitive enum values (`max`, `WARNING`) and a valid composite 
duration pass validation.
   
   ## Why
   
   The DTO gates every alert rule create/update payload; only 
channel/duration/metric normalization branches were covered before.
   
   ## Testing
   
   `mvn -B test -Dtest=AlertRuleRequestDTOTest` — 7/7 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