yyqdbngt opened a new pull request, #3533:
URL: https://github.com/apache/rocketmq-dashboard/pull/3533
### Summary
Adds the first dedicated unit test suite for `UpdateConfigDTO`, the
validated payload of the broker config update endpoint.
The DTO mixes one required field (`id`) with several optional numeric fields
that carry `@Min`/`@Max` bounds. The new tests cover the required-field rule,
the upper/lower bounds of every numeric field and the all-optional numeric case.
### Changes
-
`server/src/test/java/org/apache/rocketmq/studio/cluster/config/UpdateConfigDTOTest.java`
- `acceptsCompletePayload`: a fully populated payload passes validation.
- `rejectsMissingId` / `rejectsBlankId`: null or blank `id` yields the `id
is required` violation.
- `rejectsOutOfRangeMaxMessageSize` + `acceptsBoundaryMaxMessageSize`:
1048576-134217728 envelope enforced, boundaries accepted.
- `rejectsOutOfRangeFileReservedTime` / `rejectsZeroFileReservedTime`:
1-720 envelope enforced.
- `rejectsOutOfRangeQueueCounts`: 1-256 envelope enforced for write and
read queue counts.
- `rejectsOutOfRangeBrokerPermission`: 0-7 envelope enforced.
- `optionalNumericFieldsMayBeAbsent`: numeric knobs are not mandatory.
### Testing
- `mvn -B test -Dtest=UpdateConfigDTOTest` passes (10 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]