Skip to content

HDDS-16223. Remove racy pre-condition assertion in TestRefreshVolumeUsageHandler - #11063

Open
rich7420 wants to merge 1 commit into
apache:masterfrom
rich7420:HDDS-16223
Open

HDDS-16223. Remove racy pre-condition assertion in TestRefreshVolumeUsageHandler#11063
rich7420 wants to merge 1 commit into
apache:masterfrom
rich7420:HDDS-16223

Conversation

@rich7420

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

The test sets HDDS_NODE_REPORT_INTERVAL to 1s, so the datanode node report can reach SCM between key.close() and the assertion that SCM still shows the pre-write used space, making assertTrue(...getScmUsed().isEqual(baseline)) intermittently fail (expected true but was false). That pre-condition asserts a transient not-yet-propagated state and adds no coverage; the intended behavior (SCM eventually reflects the increased used space) is already verified by the following waitFor and assertTrue(...isGreater(baseline)). Remove the racy assertion.

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-16223

How was this patch tested?

https://github.com/rich7420/ozone/actions/runs/32255956955/

https://github.com/rich7420/ozone/actions/runs/32255725038

…sageHandler

The test sets HDDS_NODE_REPORT_INTERVAL to 1s, so the datanode node report can
reach SCM between key.close() and the assertion that SCM still shows the
pre-write used space, making assertTrue(...getScmUsed().isEqual(baseline))
intermittently fail (expected true but was false). That pre-condition asserts a
transient not-yet-propagated state and adds no coverage; the intended behavior
(SCM eventually reflects the increased used space) is already verified by the
following waitFor and assertTrue(...isGreater(baseline)). Remove the racy
assertion.
Copilot AI lite review requested due to automatic review settings August 19, 2026 13:27

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

2 participants