yyqdbngt opened a new pull request, #3575:
URL: https://github.com/apache/rocketmq-dashboard/pull/3575
### Summary
Adds the first dedicated unit test suite for `RegionNames`, the
startup-loaded map that resolves cloud region ids to display names.
The resolver falls back to the raw id for anything unknown and passes blank
or null input through untouched. The tests run against the real
`regions.properties` resource and pin the known-region mapping plus the
fallback behaviour.
### Changes
-
`server/src/test/java/org/apache/rocketmq/studio/common/util/RegionNamesTest.java`
- `resolvesKnownRegionToDisplayName`: `cn-hangzhou` maps to the bundled
display name.
- `fallsBackToRawIdForUnknownRegion`: unknown ids stay as-is.
- `trimsInputBeforeLookup`: surrounding whitespace is ignored.
- `nullRegionStaysNull` / `blankRegionPassesThrough`: degenerate inputs
pass through.
- `displayNameRoundTripsWhenPassedAgain`: re-resolving a display name is
idempotent.
### Testing
- `mvn -B test -Dtest=RegionNamesTest` passes (6 tests, all green).
--
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]