Yuan Luo created YARN-12066:
-------------------------------

             Summary: Fix MockRM shutdown in TestableFederationClientInterceptor
                 Key: YARN-12066
                 URL: https://issues.apache.org/jira/browse/YARN-12066
             Project: Hadoop YARN
          Issue Type: Bug
            Reporter: Yuan Luo


h2. Problem
* {{TestableFederationClientInterceptor.registerBadSubCluster()}} uses 
{{ConcurrentHashMap.contains()}} to check a {{SubClusterId}}, but this method 
checks values rather than keys.
* Consequently, an existing cached {{MockRM}} is not closed when its subcluster 
is marked as bad.

h2. Solution
* Replace {{contains()}} with {{containsKey()}} so that the cached {{MockRM}} 
is closed.
* Limit the change to the test helper; production code is unchanged.

h2. Validation
* Ran {{TestFederationClientInterceptorRetry}} locally with JDK 17.0.8 on 
macOS: 24 tests, 0 failures, 0 errors, 1 skipped.
* Verified the fresh Surefire XML report with 
{{maven.test.failure.ignore=false}}.
* {{git diff --check}} passed.

h2. Related PR




--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to