Skip to content

HDDS-13774. [Recon] Consolidate NSSummary endpoint tests into one suite#10769

Open
priyeshkaratha wants to merge 1 commit into
apache:masterfrom
priyeshkaratha:HDDS-13774
Open

HDDS-13774. [Recon] Consolidate NSSummary endpoint tests into one suite#10769
priyeshkaratha wants to merge 1 commit into
apache:masterfrom
priyeshkaratha:HDDS-13774

Conversation

@priyeshkaratha

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

The NSSummary REST API had three near-duplicate test classes TestNSSummaryEndpointWith{FSO,Legacy,OBSAndLegacy} (~4,500 lines). This replaces them with a single @ParameterizedClass suite (TestNSSummaryEndpoint) driven by per-layout scenario objects, sharing all constants, fixtures, and assertions.

  • Duplication: FSO and Legacy were ~95% identical; all three repeated the mock SCM, replica generation, and populate logic.
  • Weak replication coverage: the three Ratis tests asserted getReplicatedSize(response.getSize()) == response.getSizeWithReplica() — both sides from the endpoint's own output, so they passed regardless of correctness. Keys were written with factor ONE, so sizeWithReplica collapsed to the raw size despite elaborate multi-block/container setup.

Multi-block keys now use genuine RATIS/THREE replication; replication tests assert sizeWithReplica (3×) and raw size against independent constants.

What is the link to the Apache JIRA

HDDS-13774

How was this patch tested?

TestNSSummaryEndpoint: 117 run, 0 failures. checkstyle.sh and rat.sh clean

Generated-by: Claude Code (Opus 4.8)

@priyeshkaratha
priyeshkaratha marked this pull request as ready for review July 15, 2026 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants