YARN-1970. Prepare YARN codebase for JUnit 4.11. Contributed by Chris Nauroth.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1589001 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Chris Nauroth 2014-04-21 23:31:18 +00:00
parent a4475406f8
commit 84388525a3
7 changed files with 16 additions and 6 deletions

View File

@ -18,7 +18,7 @@
package org.apache.hadoop.yarn.sls.utils;
import junit.framework.Assert;
import org.junit.Assert;
import org.junit.Test;
public class TestSLSUtils {

View File

@ -18,7 +18,7 @@
package org.apache.hadoop.yarn.sls.web;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.commons.io.FileUtils;
import org.apache.hadoop.yarn.sls.SLSRunner;
import org.junit.Test;

View File

@ -56,6 +56,8 @@ Release 2.5.0 - UNRELEASED
YARN-1870. FileInputStream is not closed in ProcfsBasedProcessTree#constructProcessSMAPInfo.
(Fengdong Yu via junping_du)
YARN-1970. Prepare YARN codebase for JUnit 4.11. (cnauroth)
OPTIMIZATIONS
BUG FIXES

View File

@ -28,7 +28,7 @@
import java.util.List;
import java.util.concurrent.atomic.AtomicBoolean;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.ha.ClientBaseWithFixes;

View File

@ -21,7 +21,7 @@
import java.io.IOException;
import java.util.ArrayList;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.ipc.RPC;

View File

@ -20,7 +20,7 @@
import java.io.IOException;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.hadoop.ipc.RPC;
import org.apache.hadoop.yarn.api.records.NodeId;

View File

@ -28,7 +28,7 @@
import javax.ws.rs.core.MediaType;
import junit.framework.Assert;
import org.junit.Assert;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@ -37,6 +37,8 @@
import org.apache.hadoop.ha.HAServiceProtocol.HAServiceState;
import org.apache.hadoop.ha.HAServiceProtocol.StateChangeRequestInfo;
import org.apache.hadoop.ha.HealthCheckFailedException;
import org.apache.hadoop.metrics2.MetricsSystem;
import org.apache.hadoop.metrics2.lib.DefaultMetricsSystem;
import org.apache.hadoop.net.NetUtils;
import org.apache.hadoop.security.AccessControlException;
import org.apache.hadoop.service.AbstractService;
@ -92,6 +94,12 @@ public void setUp() throws Exception {
// Enable webapp to test web-services also
configuration.setBoolean(MockRM.ENABLE_WEBAPP, true);
configuration.setBoolean(YarnConfiguration.YARN_ACL_ENABLE, true);
ClusterMetrics.destroy();
QueueMetrics.clearQueueMetrics();
MetricsSystem ms = DefaultMetricsSystem.instance();
if (ms.getSource("ClusterMetrics") != null) {
DefaultMetricsSystem.shutdown();
}
}
private void checkMonitorHealth() throws IOException {