YARN-2109. Fix TestRM to work with both schedulers. (Anubhav Dhoot via kasha)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1605144 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Karthik Kambatla 2014-06-24 17:34:29 +00:00
parent e921428d1a
commit e9cf83174a
2 changed files with 13 additions and 1 deletions

View File

@ -166,6 +166,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

View File

@ -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();