yyqdbngt opened a new pull request, #3574:
URL: https://github.com/apache/rocketmq-dashboard/pull/3574
### Summary
Adds the first dedicated unit test suite for
`DuplicateInstanceNameException`, the typed 400 error raised when an instance
name collides at creation time.
The exception composes the offending name into a stable message and stays
assignable to `BusinessException`. The tests pin the code, message and type
hierarchy.
### Changes
-
`server/src/test/java/org/apache/rocketmq/studio/instance/DuplicateInstanceNameExceptionTest.java`
- `isBusinessExceptionWithBadRequestCode`: code 400 and the composed
message.
- `keepsTheOffendingNameInMessage`: the duplicated name appears verbatim.
- `isAssignableToBusinessException`: usable wherever `BusinessException`
is caught.
### Testing
- `mvn -B test -Dtest=DuplicateInstanceNameExceptionTest` passes (3 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]