[ 
https://issues.apache.org/jira/browse/HDDS-16266?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

ASF GitHub Bot updated HDDS-16266:
----------------------------------
    Labels: pull-request-available  (was: )

> Add mock-based unit tests for Ratis write path
> ----------------------------------------------
>
>                 Key: HDDS-16266
>                 URL: https://issues.apache.org/jira/browse/HDDS-16266
>             Project: Apache Ozone
>          Issue Type: Improvement
>          Components: Ozone Client
>            Reporter: Ren Koike
>            Assignee: Ren Koike
>            Priority: Major
>              Labels: pull-request-available
>
> Extend the mock-based testing approach to the Ratis write path 
> ({*}RatisBlockOutputStream{*} / {*}KeyOutputStream{*}).
> The Ratis path is simpler to mock than *DataStream* because 
> *XceiverClientSpi* is abstract (not final), so a concrete 
> *MockXceiverClientSpi* subclass works without Mockito-inline. An existing 
> *MockXceiverClientSpi* in *TestBlockOutputStreamCorrectness* already proves 
> this pattern works.
> New files:
> - *FakeRatisPipeline* test harness with failure injection for writeChunk, 
> putBlock, and watchForCommit.
> - {*}TestRatisBlockOutputStreamUnit{*}.java — block-level tests covering 
> write+close, flush, hsync, putBlock failure, watchForCommit failure, 
> writeOnRetry, and data integrity.
> - {*}TestKeyOutputStreamUnit{*}.java — key-level tests covering write+commit, 
> cross-block-boundary allocation, hsync-to-OM, container-close retry, and 
> atomic key size.
> All tests should pass on current code — the Ratis hsync correctly propagates 
> exceptions.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to