luoyuan3471 opened a new pull request, #8875:
URL: https://github.com/apache/hadoop/pull/8875

   # YARN-12046. Close ResourceManager and resolver fixtures in 
TestNodesListManager
   
   Jira: https://issues.apache.org/jira/browse/YARN-12046
   
   ## Description of PR
   
   `TestNodesListManager` creates ResourceManagers and starts cached resolvers
   without corresponding test cleanup.
   
   Keep the ResourceManagers and both cached-resolver fixtures on the test
   instance. Stop the ResourceManager after each test, and stop the cached
   resolver in a `finally` block so resolver cleanup is still attempted when
   ResourceManager shutdown fails.
   
   The event-based resolver test must assign the instance field rather than a
   local variable; otherwise that resolver would still be omitted from cleanup.
   
   This is test-only. Existing resolver and node-event assertions are preserved,
   and the process-wide metrics system is not shut down by this patch.
   
   ## How Was This Patch Tested?
   
   - Apache base: `f842297570243587f0ed7a81ebe80bb178098bca`.
   - JDK 17, Maven Wrapper, reactor compilation: passed.
   - `TestNodesListManager`: 4 tests, 0 failures, 0 errors, 0 skipped.
   - The fresh Surefire XML was checked in addition to the Maven result.
   - Diff whitespace check: passed.
   
   Command:
   
   ```sh
   ./mvnw -B -pl 
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager
 -am -Dtest=TestNodesListManager -Dsurefire.failIfNoSpecifiedTests=false 
-Dmaven.test.failure.ignore=false -DforkCount=1 -DskipShade test
   ```
   


-- 
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]

Reply via email to