yyqdbngt opened a new pull request, #3781:
URL: https://github.com/apache/rocketmq-dashboard/pull/3781
### Motivation
The existing `AlertNotificationTemplateTest` covers the documented
placeholders, the default format and the no-recursion guard, but the
empty-field rendering, the raw (non-rescaled) current value for non-ratio
metrics and template whitespace trimming were untested.
### Changes
- `missingAlertFieldsRenderAsEmptyValues`: absent rule/alert fields (title,
description, value, time, labels, level, ruleName) expand to empty strings
without crashing.
- `rawCurrentValueIsUsedForNonRatioMetrics`: for a non-ratio metric a `%`
threshold unit does not rescale `${value}`, which stays at the raw current
value.
- `whitespaceAroundTemplateIsTrimmed`: leading/trailing whitespace around a
custom template is stripped before rendering.
### Verification
```
mvn -B test -Dtest=AlertNotificationTemplateTest
[INFO] Tests run: 6, 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]