HDDS-16134. Fix flaky testPipelineExclusionWithPipelineFailure - #11062
HDDS-16134. Fix flaky testPipelineExclusionWithPipelineFailure#11062Eason09053360 wants to merge 1 commit into
Conversation
52f539f to
806dd46
Compare
There was a problem hiding this comment.
Pull request overview
Warning
Copilot couldn't run its full agentic review because it didn't start before the timeout. Make sure your repository has a runner available, or add a copilot-code-review.yml file specifying one with the runs-on attribute. See the docs for more details.
This PR reduces test flakiness and corrects Recon container-health test setup by removing a non-invariant assertion and ensuring an “empty container” scenario is exercised deterministically.
Changes:
- Removes a flaky assertion that the exclude list’s datanodes set is always empty in
testPipelineExclusionWithPipelineFailure. - Updates Recon container-health test documentation to reflect the “empty container” reasoning more accurately.
- Adjusts Recon test setup to create an empty container without writing a block.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/client/rpc/TestFailureHandlingByClient.java | Drops a non-deterministic datanode-exclude assertion and documents why. |
| hadoop-ozone/integration-test-recon/src/test/java/org/apache/hadoop/ozone/recon/TestReconTasks.java | Clarifies test rationale and changes setup to avoid writing blocks so the container remains “empty.” |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
806dd46 to
3cad0db
Compare
chihsuan
left a comment
There was a problem hiding this comment.
Thanks for the patch! LGTM +1 @Eason09053360 I checked the exclude list logic and can confirm your analysis, that assertion was never an invariant here.
One thing: could we run flaky-test-check GH workflow (10x10) and link the run in the PR description? That would help confirm the test is stable.
Thanks for reviewing ! |
What changes were proposed in this pull request?
testPipelineExclusionWithPipelineFailureintermittently fails on thegetDatanodes()assertion:The test shuts down two of the three datanodes, so
watchForCommitcan time out and report them as failed servers.KeyOutputStream.handleExceptionInternaladds those to the exclude list independently of the pipeline exclusion the test is actually checking, so an empty datanode set is not an invariant here - it just depends on whether the watch reply lands first.This drops the
getDatanodes()assertion. The pipeline assertion, which is the property under test, stays.Same fix as HDDS-15823 (a8fcb09), which removed the equivalent assertions from
testContainerExclusionWithClosedContainerExceptionin this file.What is the link to the Apache Jira
https://issues.apache.org/jira/browse/HDDS-16134
How was this patch tested?
flaky-test-check10x10 (100 runs), all splits green:https://github.com/Eason09053360/ozone/actions/runs/32264781480
checkstyle clean.
Generated-by: Claude Code (Claude Opus 5)