Ren Koike created HDDS-16267:
--------------------------------
Summary: Add mock-based unit tests for EC write path
Key: HDDS-16267
URL: https://issues.apache.org/jira/browse/HDDS-16267
Project: Apache Ozone
Issue Type: Improvement
Components: Ozone Client
Reporter: Ren Koike
Assignee: Ren Koike
Extend the mock-based testing approach to the EC write path
({*}ECBlockOutputStream{*} / {*}ECKeyOutputStream{*}). EC requires N
*MockXceiverClientSpi* instances (one per stripe node) but uses the same
pattern.
New files:
- {*}TestECBlockOutputStreamUnit{*}.java — block-level tests covering single
chunk write, putBlock with stripe checksum, and write failure on one node.
- {*}TestECKeyOutputStreamUnit{*}.java — key-level tests covering full stripe
write, partial stripe (padding), parity generation, stripe retry on node
failure, close with partial stripe, and cross-block-group boundary.
Key aspects to cover:
- The producer-consumer queue between write thread and flush executor.
- The blocking .get() pattern in getFailedStreams() (documents current
behavior; tests may need timeouts to avoid hanging).
- *RawErasureEncoder* is real (in-memory), only *XceiverClientSpi* is mocked.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]