chihsuan opened a new pull request, #10453:
URL: https://github.com/apache/ozone/pull/10453

   > [!NOTE]
   > **Draft, not ready for review.** Stacked on #10451 (HDDS-10310): only the 
last commit (`HDDS-15493. ...`) belongs to this PR. The diff will shrink to 
that single commit once #10451 is merged and master is merged back in.
   
   ## What changes were proposed in this pull request?
   
   HDDS-14721 made the whole `TestOMRatisSnapshots` class parameterized (via 
`@ParameterizedClass`) over `ozone.om.db.checkpoint.use.inode.based.transfer` 
(false/true), doubling every test in the class even though the parameter only 
affects the checkpoint transfer path. This PR limits the parameterization to 
the tests that actually exercise the transfer:
   
   1. **New `TestOMRatisSnapshotTransfer`** keeps the class-level 
parameterization (v1/v2 checkpoint format) and holds the transfer-path tests:
      - `testInstallSnapshot`: the only test covering the multi-tarball path 
(`ozone.om.ratis.snapshot.max.total.sst.size` + `SnapshotMaxSizeInjector`), 
which `TestOMBootstrap` does not cover.
      - The two `@Unhealthy("HDDS-13300")` incremental-snapshot tests, so they 
retain both-format coverage when re-enabled.
      - `SnapshotMaxSizeInjector` and the incremental-tarball helpers move 
along with them.
   2. **`TestOMRatisSnapshots` drops the class-level parameterization**; the 
remaining 5 tests run once with the default (inode-based) transfer:
      - `testInstallOldCheckpointFailure` and 
`testInstallCorruptedCheckpointFailure` never download a tarball (they call 
`installCheckpoint()` directly with a locally prepared checkpoint), so the 
parameter added no coverage for them.
      - `testInstallSnapshotWithClientWrite`/`ClientRead` exercise the 
download, but their v1/v2 endpoint coverage duplicates `TestOMBootstrap` (added 
by HDDS-14721 specifically to verify both endpoints); their unique value 
(concurrent client IO during install) is format-agnostic.
      - `testInstallSnapshotFromLeaderFailedDownloadCleanupSucceeds` verifies 
cleanup behavior that is format-agnostic.
   
   Both checkpoint formats stay covered on every transfer path (multi-tarball 
by the new class, endpoint selection by `TestOMBootstrap`), while the 
non-transfer tests stop paying the 2x cluster setup cost.
   
   The moved test bodies are byte-identical to the originals. The new class 
follows the existing `TestOMBootstrap` pattern of reusing the static helpers 
(`checkSnapshot`, `createOzoneSnapshot`, `writeKeys`) from 
`TestOMRatisSnapshots`.
   
   Measured locally (M-series MacBook, on top of HDDS-10310): 
`TestOMRatisSnapshots` (5 tests, single run) 141.7s + 
`TestOMRatisSnapshotTransfer` (1 active test x 2 formats) 205.6s, roughly 350s 
total vs ~484-526s for the fully parameterized class on the same machine (~150s 
additional saving).
   
   ## What is the link to the Apache JIRA
   
   https://issues.apache.org/jira/browse/HDDS-15493
   
   ## How was this patch tested?
   
   Full runs of both classes locally on top of HDDS-10310:
   
   ```
   mvn -pl hadoop-ozone/integration-test test 
-Dtest='TestOMRatisSnapshots,TestOMRatisSnapshotTransfer'
   TestOMRatisSnapshots:        Tests run: 5, Failures: 0, Errors: 0, Skipped: 0
   TestOMRatisSnapshotTransfer: Tests run: 2, Failures: 0, Errors: 0, Skipped: 0
   ```
   
   `checkstyle` passes on the module. Fork CI (`build-branch`) green: 
https://github.com/chihsuan/ozone/actions/runs/27064650428
   


-- 
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]

Reply via email to