You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2026/10/27 03:32:00 UTC
[jira] [Commented] (YARN-12046) Close ResourceManager and resolver fixtures in TestNodesListManager
[ https://issues.apache.org/jira/browse/YARN-12046?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18132690#comment-18132690 ]
ASF GitHub Bot commented on YARN-12046:
---------------------------------------
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
```
> Close ResourceManager and resolver fixtures in TestNodesListManager
> -------------------------------------------------------------------
>
> Key: YARN-12046
> URL: https://issues.apache.org/jira/browse/YARN-12046
> Project: Hadoop YARN
> Issue Type: Bug
> Components: resourcemanager
> Reporter: Yuan Luo
> Assignee: Yuan Luo
> Priority: Minor
>
> TestNodesListManager creates ResourceManager fixtures and starts cached resolvers without corresponding test cleanup.
> Keep the ResourceManagers and cached-resolver fixtures on the test instance. Stop the ResourceManager after each test and close the cached resolver from a finally block, including the resolver used by testCachedResolverWithEvent. This avoids leaving the event-test resolver hidden in a local variable.
> This is a test-only lifecycle fix. Existing node-event and resolver assertions remain unchanged, and the process-wide metrics system is not shut down.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)
---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org