You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "Untergang1 (via GitHub)" <gi...@apache.org> on 2026/10/13 06:58:49 UTC
[I] [Enhancement] Add unit tests for TopicSysFlag and SubscriptionSysFlag [rocketmq]
Untergang1 opened a new issue, #11402:
URL: https://github.com/apache/rocketmq/issues/11402
### Before Creating the Enhancement Request
- [x] I have confirmed that this should be classified as an enhancement rather than a bug/feature.
### Summary
TopicSysFlag and SubscriptionSysFlag currently lack direct unit tests, while other helpers in the same package, such as PullSysFlag, already have dedicated tests.
### Motivation
These classes are used across RocketMQ components, including broker, namesrv, and tools. Direct unit tests would help catch regressions in bit manipulation and make future refactoring safer.
### Describe the Solution You'd Like
Add TopicSysFlagTest and SubscriptionSysFlagTest under common/src/test/java/org/apache/rocketmq/common/sysflag/.
The tests should cover all buildSysFlag combinations, set/has/clear operations, flag independence, preservation of unrelated bits, and idempotency.
No production code changes are needed.
### Describe Alternatives You've Considered
Existing broker or namesrv tests could cover these flags indirectly, but dedicated unit tests would be simpler, faster, and more focused.
### Additional Context
Related to #8262
--
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.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] [Enhancement] Add unit tests for TopicSysFlag and SubscriptionSysFlag [rocketmq]
Posted by "RockteMQ-AI (via GitHub)" <gi...@apache.org>.
RockteMQ-AI commented on issue #11402:
URL: https://github.com/apache/rocketmq/issues/11402#issuecomment-6140223046
**Issue Evaluation**
Category: `type/enhancement` | Status: **Evaluated — Feasible**
**Assessment:**
- **Feasibility**: Feasible — straightforward test addition, no production code changes
- **Scope**: `common` module only — `TopicSysFlag` and `SubscriptionSysFlag` in `org.apache.rocketmq.common.sysflag`
- **Compatibility**: No breaking changes — purely additive test coverage
- **Risk**: Low — test-only changes
**Recommendation:** Proceed. The existing `PullSysFlagTest` (if present) or similar sysflag tests in the same package can serve as a reference for test patterns. Tests should cover:
1. All `buildSysFlag` bit combinations
2. `set`/`has`/`clear` operations
3. Flag independence (one flag doesn't affect others)
4. Preservation of unrelated bits during set/clear
5. Idempotency of operations
An automated fix proposal (PR with the unit tests) can be generated. Reply `/approve` to proceed with PR generation.
---
*Automated evaluation by github-manager-bot*
--
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
Re: [I] [Enhancement] Add unit tests for TopicSysFlag and SubscriptionSysFlag [rocketmq]
Posted by "ShannonDing (via GitHub)" <gi...@apache.org>.
ShannonDing closed issue #11402: [Enhancement] Add unit tests for TopicSysFlag and SubscriptionSysFlag
URL: https://github.com/apache/rocketmq/issues/11402
--
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