You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "zjncs (via GitHub)" <gi...@apache.org> on 2026/10/09 02:05:27 UTC
[PR] test(tools): pin the topic input defaulting rule [rocketmq-dashboard]
zjncs opened a new pull request, #5743:
URL: https://github.com/apache/rocketmq-dashboard/pull/5743
### What
`TopicInput` — the tool-side topic shape — had no test. This adds `TopicInputTest` with 5 tests.
### What is pinned
- a fully specified input maps every field through `toTopicVO`;
- **the defaulting rule**: a model that answers with only the topic name still produces a creatable topic — 8 write queues, 8 read queues, NORMAL type, RW permission;
- **write and read queues default independently**: specifying one never silently changes the other;
- `from()` maps every stored `TopicVO` field into the input;
- the round trip through the VO preserves the explicit fields.
### Verification
- New tests on unmodified code: **5/5 green**, checkstyle clean (`mvn test -Dtest=TopicInputTest`).
- Discriminating mutations on `TopicInput`, build result verified red each time:
1. the default queue count changed from 8 to 1 — red (two tests);
2. the default permission downgraded from RW to RO, which would make every defaulted topic unwritable — red;
3. the read-queue default collapsed to follow `writeQueues` — red (the independence test catches it).
- Restored: 5/5 green. Test-only change; no product code touched.
--
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