diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index 6578d1f26c1..170af0d3ec3 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -181,6 +181,8 @@ Release 2.5.0 - UNRELEASED YARN-2192. TestRMHA fails when run with a mix of Schedulers. (Anubhav Dhoot via kasha) + YARN-2109. Fix TestRM to work with both schedulers. (Anubhav Dhoot via kasha) + OPTIMIZATIONS BUG FIXES diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestRM.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestRM.java index 468c6895f88..cd67ebc216b 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestRM.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-resourcemanager/src/test/java/org/apache/hadoop/yarn/server/resourcemanager/TestRM.java @@ -28,6 +28,9 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import org.apache.hadoop.metrics2.lib.DefaultMetricsSystem; +import org.apache.hadoop.yarn.server.resourcemanager.scheduler.QueueMetrics; +import org.junit.After; import org.junit.Assert; import org.apache.commons.logging.Log; @@ -78,7 +81,14 @@ public class TestRM { // Milliseconds to sleep for when waiting for something to happen private final static int WAIT_SLEEP_MS = 100; - + + @After + public void tearDown() { + ClusterMetrics.destroy(); + QueueMetrics.clearQueueMetrics(); + DefaultMetricsSystem.shutdown(); + } + @Test public void testGetNewAppId() throws Exception { Logger rootLogger = LogManager.getRootLogger();