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

   ## Summary
   
   Extends the existing `AlertRuleDurationTest` from two assertions to full 
parser coverage.
   
   Added cases:
   - every supported unit: `ms`, `s`, `m`, `h`, `d`, `w` (7 days), `y` (365 
days);
   - blank strings and `0s` parse to `Duration.ZERO`;
   - compound durations across units (`2d12h`, `1w2d3h`, `1m30s500ms`);
   - outer whitespace is trimmed before parsing;
   - malformed inputs (`5`, `h30m`, `1h 30m`, `1h30`, `1.5h`, `5x`, `-5m`) are 
rejected with the `Invalid alert duration` business error.
   
   ## Why
   
   The parser gates alert-rule request payloads; the previous suite only 
covered a single compound value, null, and overflow, leaving unit/grammar 
handling unpinned.
   
   ## Testing
   
   `mvn -B test -Dtest=AlertRuleDurationTest` — 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