Huang Kuan Hao created HDDS-16223:
-------------------------------------

             Summary: TestRefreshVolumeUsageHandler#test is flaky
                 Key: HDDS-16223
                 URL: https://issues.apache.org/jira/browse/HDDS-16223
             Project: Apache Ozone
          Issue Type: Sub-task
            Reporter: Huang Kuan Hao


Failed here (integration (container) job of a fork CI run for an unrelated 
change), then passed on rerun of the same job, so this is flaky:
https://github.com/rich7420/ozone/actions/runs/32114853096/job/95646137582

[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 26.11 s 
<<< FAILURE! -- in 
org.apache.hadoop.ozone.container.common.statemachine.commandhandler.TestRefreshVolumeUsageHandler
[ERROR] TestRefreshVolumeUsageHandler.test:105 expected: <true> but was: <false>
org.opentest4j.AssertionFailedError: expected: <true> but was: <false>
      at 
org.apache.hadoop.ozone.container.common.statemachine.commandhandler.TestRefreshVolumeUsageHandler.test(TestRefreshVolumeUsageHandler.jav

Line 105 asserts that SCM's recorded used space still equals the pre-write 
value, before the node report is expected to refresh it:

assertTrue(cluster.getStorageContainerManager().getScmNodeManager().getUsageInfo(datanodeDetails).getScmNodeStat().getScmUsed().isEqual(currentScmUsed));

This is a timing race: the test assumes the datanode's node report / DU cache 
update has not yet propagated the new used space to SCM at this point, but the 
async report can land before the assertion runs, making it false. The 
subsequent waitFor for the refreshed value is the real check; this 
pre-condition assert is the flaky one. It passes on rerun.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to