Skip to content

HDDS-15493. Limit checkpoint-format parameterization in TestOMRatisSnapshots to transfer tests#10453

Open
chihsuan wants to merge 2 commits into
apache:masterfrom
chihsuan:HDDS-15493
Open

HDDS-15493. Limit checkpoint-format parameterization in TestOMRatisSnapshots to transfer tests#10453
chihsuan wants to merge 2 commits into
apache:masterfrom
chihsuan:HDDS-15493

Conversation

@chihsuan

@chihsuan chihsuan commented Jun 6, 2026

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Test-only change. HDDS-14721 made the whole TestOMRatisSnapshots class parameterized (@ParameterizedClass) over ozone.om.db.checkpoint.use.inode.based.transfer (false/true), so every test runs twice even though the parameter only affects the checkpoint transfer path.

This PR keeps the v1/v2 parameterization only for the tests that actually exercise the transfer to speed up tests, by splitting the class:

Test Lands in Runs Why
testInstallSnapshot TestOMRatisSnapshotTransfer (new) v1 + v2 only test of the multi-tarball path (max.total.sst.size + SnapshotMaxSizeInjector); not covered by TestOMBootstrap
@Unhealthy("HDDS-13300") incremental tests TestOMRatisSnapshotTransfer (new) v1 + v2 keep both-format coverage for when they're re-enabled
testInstallOldCheckpointFailure, testInstallCorruptedCheckpointFailure TestOMRatisSnapshots once call installCheckpoint() directly, never download a tarball — parameter added no coverage
testInstallSnapshotWithClientWrite / ClientRead TestOMRatisSnapshots once v1/v2 endpoint coverage duplicates TestOMBootstrap; their unique value (concurrent client IO during install) is format-agnostic
testInstallSnapshotFromLeaderFailedDownloadCleanupSucceeds TestOMRatisSnapshots once cleanup behavior is format-agnostic

Net: both checkpoint formats stay covered on every transfer path (multi-tarball by the new class, endpoint selection by TestOMBootstrap), while the format-agnostic tests stop paying the 2× cluster-setup cost.

The moved test bodies are byte-identical to the originals; SnapshotMaxSizeInjector and the incremental-tarball helpers move with them. The new class reuses the static helpers (checkSnapshot, createOzoneSnapshot, writeKeys) from TestOMRatisSnapshots, following the existing TestOMBootstrap pattern.

For review: every retained line in TestOMRatisSnapshotTransfer matches the master TestOMRatisSnapshots source except two mechanical adjustments the split requires: (1) the checkSnapshot/createOzoneSnapshot/writeKeys wrappers call the shared statics via a TestOMRatisSnapshots. qualifier, and (2) conf is a local in init() rather than a field (the new class never reads it outside setup).

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.

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

Speedup

From the integration-om CI job, both on top of HDDS-10310 (so this isolates the effect of this change):

Tests run Time
masterTestOMRatisSnapshots (fully parameterized, v1 + v2) 6 + 6 402.6s
this PRTestOMRatisSnapshots (single run) 5 131.4s
this PRTestOMRatisSnapshotTransfer (v1 + v2) 1 + 1 153.0s
this PR total 284.4s

~118s faster (~29%), by no longer running the four format-agnostic tests twice.

@chihsuan chihsuan marked this pull request as ready for review June 9, 2026 09:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant