You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "chennaji9 (via GitHub)" <gi...@apache.org> on 2026/10/09 13:58:10 UTC
[PR] [ISSUE #11337] test(controller): cover ControllerClosure response propagation [rocketmq]
chennaji9 opened a new pull request, #11346:
URL: https://github.com/apache/rocketmq/pull/11346
<!-- Please make sure the target branch is right. In most case, the target branch should be `develop`. -->
### Which Issue(s) This PR Fixes
Fixes #11337
### Brief Description
Adds `ControllerClosureTest`, direct coverage of how every JRaft-driven controller request completes (currently untested):
- `run(Status.OK)` completes the future with the configured response code, body and remark — and leaves body/remark unset when the `ControllerResult` carries none;
- `run(Status<error>)` maps any JRaft failure to `ResponseCode.CONTROLLER_JRAFT_INTERNAL_ERROR` with the status message;
- `taskWithThisClosure()` returns the same cached `Task` instance on repeated calls, bound to this closure as `done`, carrying the encoded request as `data`.
Test-only change; no production code touched.
### How Did You Test This Change?
`mvn -pl controller -Dtest=ControllerClosureTest -Dsurefire.failIfNoSpecifiedTests=false test` (JDK 11, PR base commit): `Tests run: 4, Failures: 0, Errors: 0`.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
--
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: [PR] [ISSUE #11337] test(controller): cover ControllerClosure response propagation [rocketmq]
Posted by "RockteMQ-AI (via GitHub)" <gi...@apache.org>.
RockteMQ-AI commented on PR #11346:
URL: https://github.com/apache/rocketmq/pull/11346#issuecomment-6130746434
**Issue Evaluation**
Category: `type/enhancement` | Status: **Confirmed**
The gap in ControllerClosure test coverage is valid. JRaft-driven controller request completion semantics currently lack direct tests for:
- `run(Status.OK)` response propagation with and without body/remark
- `run(Status<error>)` mapping to `ResponseCode.CONTROLLER_JRAFT_INTERNAL_ERROR`
- `taskWithThisClosure()` caching and binding behavior
**Impact:** Untested controller closure logic could mask regressions in controller request handling.
**Severity:** Medium (test gap in controller layer)
The proposed `ControllerClosureTest` with 4 test methods provides targeted coverage. Test-only change with no production code impact.
---
*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: [PR] [ISSUE #11337] test(controller): cover ControllerClosure response propagation [rocketmq]
Posted by "chennaji9 (via GitHub)" <gi...@apache.org>.
chennaji9 commented on PR #11346:
URL: https://github.com/apache/rocketmq/pull/11346#issuecomment-6259324303
Hi @RongtongJin, gentle follow-up on this one — it has been sitting for quite a while now. Everything (local tests + CI) is green, and the change is deliberately minimal (cover ControllerClosure response propagation). A review would be really appreciated whenever you have time, and merging would be great if it looks reasonable. Thank you!
--
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: [PR] [ISSUE #11337] test(controller): cover ControllerClosure response propagation [rocketmq]
Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #11346:
URL: https://github.com/apache/rocketmq/pull/11346#issuecomment-6083517575
## [Codecov](https://app.codecov.io/gh/apache/rocketmq/pull/11346?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 49.69%. Comparing base ([`9ea2ccd`](https://app.codecov.io/gh/apache/rocketmq/commit/9ea2ccdc2b41445aee5e177e14e501d606f5a1ed?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`8ccd7ca`](https://app.codecov.io/gh/apache/rocketmq/commit/8ccd7ca979341d64f55fbabb765766e78749cdec?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
<details><summary>Additional details and impacted files</summary>
```diff
@@ Coverage Diff @@
## develop #11346 +/- ##
=============================================
- Coverage 49.73% 49.69% -0.05%
+ Complexity 14348 14336 -12
=============================================
Files 1390 1390
Lines 103246 103246
Branches 13502 13502
=============================================
- Hits 51354 51312 -42
- Misses 45696 45728 +32
- Partials 6196 6206 +10
```
</details>
[:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/rocketmq/pull/11346?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
<details><summary> :rocket: New features to boost your workflow: </summary>
- :snowflake: [Test Analytics](https://docs.codecov.com/docs/test-analytics): Detect flaky tests, report on failures, and find test suite problems.
</details>
--
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