joseluisll opened a new pull request, #8679:
URL: https://github.com/apache/hadoop/pull/8679
### Description of PR
Shuts down 2 leaked `MiniYARNCluster` instances in 2 test files, the
hadoop-yarn slice of the mini-cluster leak scan recorded in HDFS-17957.
A leaked cluster keeps ResourceManager and NodeManager threads, heap and
ports alive under the remaining tests of the class, so one real failure
can cascade into bogus failures of later tests in the same class.
**`TestFederationRMFailoverProxyProvider`.** `testProxyProvider`, the
helper both failover tests drive, stopped its cluster only after the last
assertion, so the cluster leaked exactly when the test failed. The method
body now runs under `try`/`finally` and the stop covers every exit.
**`TestMiniYarnClusterNodeUtilization`.** The cluster lives in a field
with no teardown in the class or its ancestors; `@BeforeEach` builds and
starts a fresh cluster for each of the two test methods, so every run
leaked two clusters even when the tests passed. A new `@AfterEach` stops
whatever `setup()` built.
Test-scope only; no production code is touched.
### How was this patch tested?
Both touched classes were run on Ubuntu 24.04 with JDK
`17.0.19+10-1-24.04.2-Ubuntu`, the same JDK and OS as the precommit
agents:
| Module | Classes | Tests | Result |
|---|---|---|---|
| hadoop-yarn-client | 1 | 3 | green |
| hadoop-yarn-server-tests | 1 | 2 | green |
### For code changes:
- [x] Does the title of this PR start with the corresponding JIRA issue id?
- [ ] Object storage: N/A
- [ ] If adding new dependencies … — no new dependencies
- [ ] If applicable, have you updated the `LICENSE`… — N/A
### AI Tooling
Contains content generated by Claude Code.
- [x] The PR includes the phrase "Contains content generated by Claude Code"
- [x] My use of AI contributions follows the ASF legal policy
https://www.apache.org/legal/generative-tooling.html
🤖 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]