Repository navigation
Conversation
…se propagation Add ControllerClosureTest: OK status completes the future with the configured code/body/remark, missing body/remark stay unset, Raft failures map to CONTROLLER_JRAFT_INTERNAL_ERROR with the status message, and taskWithThisClosure caches one Task bound to the closure with the encoded request as data.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #11346 +/- ##
=============================================
- Coverage 49.75% 49.74% -0.02%
- Complexity 14354 14375 +21
=============================================
Files 1390 1390
Lines 103246 103262 +16
Branches 13502 13504 +2
=============================================
- Hits 51375 51372 -3
- Misses 45679 45689 +10
- Partials 6192 6201 +9 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
RockteMQ-AI
left a comment
There was a problem hiding this comment.
Review by github-manager-bot
Summary
Adds ControllerClosureTest covering direct coverage of JRaft-driven controller request completion paths.
Findings
- [Info]
ControllerClosureTest.java— Four tests: OK status with body/remark, OK status without body/remark, failed status mapping toCONTROLLER_JRAFT_INTERNAL_ERROR, andtaskWithThisClosurecaching. All paths are covered. - [Info] The
Taskserialization test correctly verifies that the task data matches the encoded request.
Suggestions
- None. Good coverage of a previously untested component.
Automated review by github-manager-bot
|
Issue Evaluation Category: The gap in ControllerClosure test coverage is valid. JRaft-driven controller request completion semantics currently lack direct tests for:
Impact: Untested controller closure logic could mask regressions in controller request handling. The proposed Automated evaluation by github-manager-bot |
8ccd7ca to
1b45a9d
Compare
|
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! |
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 theControllerResultcarries none;run(Status<error>)maps any JRaft failure toResponseCode.CONTROLLER_JRAFT_INTERNAL_ERRORwith the status message;taskWithThisClosure()returns the same cachedTaskinstance on repeated calls, bound to this closure asdone, carrying the encoded request asdata.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.