Skip to content

HDDS-16266. Add mock-based unit tests for Ratis write path - #11797

Open
len548 wants to merge 2 commits into
apache:masterfrom
len548:HDDS-16266
Open

len548 wants to merge 2 commits into
apache:masterfrom
len548:HDDS-16266

Conversation

@len548

@len548 len548 commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Adds mock-based unit tests for the RatisBlockOutputStream and KeyOutputStream, mirroring the existing DataStream coverage introduced by #10230.

  • MockRatisPipeline: stateful harness that simulates a Ratis pipeline for RatisBlockOutputStream. Records WriteChunk/PutBlock/watchForCommit, supports failure injection.
  • TestRatisBlockOutputStream: adds 14 block-level tests covering write+close, flush, hsync, putBlock failure, watchForCommit failure, writeOnRetry, and data integrity.
  • TestKeyOutputStream: adds 7 key-level tests for commit on close, cross-block allocation, hsync-to-OM, container-close retry, multiple hsyncs, and write-after-close rejection. Existing concurrency/pool tests are unchanged.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-16266

How was this patch tested?

All the added unit tests pass.

@len548 len548 changed the title HDDS-6266. Add mock-based unit tests for Ratis write path HDDS-16266. Add mock-based unit tests for Ratis write path Oct 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant