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 22:22:56 UTC
[PR] [ISSUE-3828][test] Deepen AlertRuleDurationTest with unit table, malformed input and blank handling [rocketmq-dashboard]
yyqdbngt opened a new pull request, #3828:
URL: https://github.com/apache/rocketmq-dashboard/pull/3828
### Motivation
The existing `AlertRuleDurationTest` covers the compound `1h30m` parse, a null input and overflow rejection, but the individual unit conversions, malformed inputs and blank handling were untested.
### Changes
- `parsesSingleAndCompoundUnits`: `ms`, `s`, `m`, `h`, `d`, `w` (7 days), `y` (365 days) and the compound `2w3d` all convert to their expected `Duration`.
- `rejectsMalformedDurations`: unknown units, trailing numbers, reversed syntax and embedded whitespace raise the 400 invalid-duration error.
- `treatsBlankValueAsZeroDuration`: a whitespace-only value maps to `Duration.ZERO`.
### Verification
```
mvn -B test -Dtest=AlertRuleDurationTest
[INFO] Tests run: 5, Failures: 0, Errors: 0, Skipped: 0
[INFO] BUILD SUCCESS
```
--
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] [ISSUE-3828][test] Deepen AlertRuleDurationTest with unit table, malformed input and blank handling [rocketmq-dashboard]
Posted by "lizhimins (via GitHub)" <gi...@apache.org>.
lizhimins closed pull request #3828: [ISSUE-3828][test] Deepen AlertRuleDurationTest with unit table, malformed input and blank handling
URL: https://github.com/apache/rocketmq-dashboard/pull/3828
--
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