jojochuang opened a new pull request, #10985: URL: https://github.com/apache/ozone/pull/10985
## What changes were proposed in this pull request? This PR adds unit test coverage for `OzoneManagerRatisServer.checkRetryCache()`. HDDS-13621 (#9711) fixed an NPE when a cached Ratis reply was unsuccessful: the server now returns `null` instead of calling `getOMResponse()` on a failed reply. This change adds targeted unit tests to lock in that behavior and to verify the success path still returns an `OMResponse`. Changes: * `checkRetryCacheReturnsNullWhenCachedReplyFailed` — mocks a failed cached `RaftClientReply` and asserts `checkRetryCache()` returns `null`. * `checkRetryCacheReturnsOmResponseWhenCachedReplySucceeded` — mocks a successful cached reply and asserts an `OMResponse` with `Status.OK` is returned. Related: [HDDS-13621](https://issues.apache.org/jira/browse/HDDS-13621), #9711. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-16097 ## How was this patch tested? * Unit tests in `TestOzoneManagerRatisServer` (two new test methods). * Fork CI (`flaky-test-check` on commit `b3c339a`): https://github.com/jojochuang/ozone/actions/runs/31129294251 — `TestOzoneManagerRatisServer#ALL` passed. Generated-by: Cursor (Composer) Made with [Cursor](https://cursor.com) -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
