fapifta opened a new pull request, #10230:
URL: https://github.com/apache/ozone/pull/10230
## What changes were proposed in this pull request?
Add `FakeDatanodePipeline` test harness that simulates a Ratis DataStream
pipeline using mocked `XceiverClientRatis` and a concrete `DataStreamOutput`
implementation, with failure injection for chunk writes, putBlock, and
watchForCommit
Add `TestBlockDataStreamOutput` with 12 block-level tests covering sub-chunk
writes, exact chunk boundaries, flush boundaries, back-pressure via stream
window, hsync happy/error paths, close behavior, write-after-close rejection,
ack tracking, data integrity, and putBlock metadata
Add `TestKeyDataStreamOutput` with 8 key-level tests covering
write-and-commit, cross-block boundary allocation, hsync-to-OM integration,
container-close retry, atomic key size validation, multiple hsyncs, and
write-after-close rejection
Two block-level tests (`hsyncPropagatesIOException`,
`hsyncPropagatesWatchFailure`) and one key-level test
(`hsyncWithBlockErrorDoesNotCallOmHsync`) are currently disabled — they
document a known hsync exception handling issue where
`BlockDataStreamOutput.hsync()` silently swallows all exceptions via an empty
catch block, and `KeyDataStreamOutput.handleFlushOrClose()` retries hsync
failures as if they were write failures. These tests will be enabled when the
fix lands.
Generated-by: Claude - Opus 4.6
## What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-15170
## How was this patch tested?
The added unit tests succeed.
--
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]