chennaji9 opened a new issue, #11337: URL: https://github.com/apache/rocketmq/issues/11337
### Description `ControllerClosure` (`controller/src/main/java/org/apache/rocketmq/controller/impl/closure/ControllerClosure.java`) decides how every JRaft-driven controller request completes: - on `Status#isOk`, it builds the response from the `ControllerResult` (code, optional body, optional remark) and completes the future; - on failure, it maps any JRaft error to `ResponseCode.CONTROLLER_JRAFT_INTERNAL_ERROR` with the status message; - `taskWithThisClosure()` caches a JRaft `Task` whose `done` is the closure and whose data is the encoded request. None of this has direct test coverage — a search of the module shows no test touches `ControllerClosure`. A regression in the response mapping (dropped body/remark, wrong error code, un-cached task re-encoding, wrong closure binding) would not be caught by the existing `DLedgerControllerTest` / manager tests, which don't exercise request completion. ### Expected behavior Direct contract tests: OK status completes the future with the configured code/body/remark (and leaves body/remark unset when absent); a failed status completes with `CONTROLLER_JRAFT_INTERNAL_ERROR` and the JRaft error message; `taskWithThisClosure()` returns the same `Task` instance on repeat calls, bound to this closure, carrying the encoded request. -- 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]
