[ 
https://issues.apache.org/jira/browse/YARN-12045?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Ayush Saxena resolved YARN-12045.
---------------------------------
    Fix Version/s: 3.6.0
     Hadoop Flags: Reviewed
       Resolution: Fixed

> Stop MockRM instances in placement constraint tests
> ---------------------------------------------------
>
>                 Key: YARN-12045
>                 URL: https://issues.apache.org/jira/browse/YARN-12045
>             Project: Hadoop YARN
>          Issue Type: Bug
>          Components: resourcemanager
>            Reporter: Yuan Luo
>            Assignee: Yuan Luo
>            Priority: Minor
>              Labels: pull-request-available
>             Fix For: 3.6.0
>
>
> h2. Problem
> {{TestAllocationTagsManager}} and {{TestPlacementConstraintsUtil}} start a 
> {{MockRM}} in their setup methods but keep it only in a local variable. 
> Neither class stops its ResourceManager after each test.
> h2. Solution
> * Retain each {{MockRM}} in an instance field and stop it in {{@AfterEach}}.
> * Apply the same fixture-lifecycle fix to both classes.
> * Test-only change; production code, placement assertions, and timeouts are 
> unchanged.
> h2. Validation
> * Local reactor compilation passed with JDK 17 and Maven Wrapper.
> * {{TestAllocationTagsManager}}: 6 tests, 0 failures, 0 errors, 0 skipped.
> * {{TestPlacementConstraintsUtil}}: 12 tests, 0 failures, 0 errors, 0 skipped.
> * Fresh Surefire XML files and {{git diff --check}} verified.
> h2. Related PR
> [PR #8876|https://github.com/apache/hadoop/pull/8876]



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