joseluisll opened a new pull request, #8835: URL: https://github.com/apache/hadoop/pull/8835
### Description of PR Backport of #8792 to branch-3.5, as requested by @steveloughran. https://issues.apache.org/jira/browse/HDFS-17987 Clean cherry-pick of trunk commit 0efa73b439bd721575a7393119202a3bc245e366, no conflicts. Fixes two causes of `TestDataNodeLifeline` flakiness: 1. The NameNode/lifeline spies were handed to the running `BPServiceActor` before the tests stubbed them, racing Mockito stubbing against the heartbeat thread. They are now installed only after stubbing. 2. `testHeartbeatAndLifelineOnError` leaked a static `BlockManagerFaultInjector`, hanging `setup()` on surefire reruns. It is now restored in `finally`. ### How was this patch tested? The patched `TestDataNodeLifeline.java` is byte-identical to trunk after #8792, and none of the branch-3.5 vs trunk differences in the classes it uses affect it. trunk test results are in #8792. Relying on Yetus to run the test against branch-3.5. ### For code changes: - [x] Does the title of this PR start with the corresponding JIRA issue id (e.g. 'HADOOP-17799. Your PR title ...')? - [ ] Object storage: Have the integration tests been executed and the endpoint declared according to the connector-specific documentation? - [ ] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? - [ ] If applicable, have you updated the `LICENSE`, `LICENSE-binary`, `NOTICE-binary` files? ### AI Tooling Contains content generated by Claude Code. - [x] The PR includes the phrase "Contains content generated by <tool>" where <tool> is the name of the AI tool used. - [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]
