smengcl opened a new pull request, #11542: URL: https://github.com/apache/ozone/pull/11542
Generated-by: Claude Code (Opus 5.5) ## What changes were proposed in this pull request? `TestReplicationSupervisor#testReconciliationTaskMetrics` fails intermittently on `assertTrue(getReplicationRequestTotalTime(...) > 0)`. `ReplicationSupervisor` records task latency with `Time.monotonicNow()`, which has millisecond resolution. The reconciliation tasks in this test call a Mockito `ContainerController` whose `reconcileContainer` does nothing, so all tasks can complete within the same millisecond and the total latency stays 0. This patch stubs `reconcileContainer` in the test to sleep 1 ms, so each successful task takes at least 1 ms and the total and average latency are always positive. ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-17027 ## How was this patch tested? - `mvn -pl :hdds-container-service test -Dtest=TestReplicationSupervisor`: 54/54 passed locally. - The fix is deterministic by construction: a 1 ms sleep guarantees a difference of at least 1 between the two `monotonicNow()` readings around each successful task. - 10x10 [flaky-test-check](https://github.com/smengcl/hadoop-ozone/actions/runs/38645780407) on this branch: in progress 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
