hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aajis...@apache.org
Subject hadoop git commit: YARN-5107. TestContainerMetrics fails. (aajisaka)
Date Thu, 19 May 2016 10:55:28 GMT
Repository: hadoop
Updated Branches:
  refs/heads/trunk 159763068 -> d4274c64b


YARN-5107. TestContainerMetrics fails. (aajisaka)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/d4274c64
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/d4274c64
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/d4274c64

Branch: refs/heads/trunk
Commit: d4274c64bc77584e2a75107c1f141319ddc4f8ab
Parents: 1597630
Author: Akira Ajisaka <aajisaka@apache.org>
Authored: Thu May 19 19:53:59 2016 +0900
Committer: Akira Ajisaka <aajisaka@apache.org>
Committed: Thu May 19 19:53:59 2016 +0900

----------------------------------------------------------------------
 .../containermanager/monitor/TestContainerMetrics.java   | 11 -----------
 1 file changed, 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/d4274c64/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/monitor/TestContainerMetrics.java
----------------------------------------------------------------------
diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/monitor/TestContainerMetrics.java
b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/monitor/TestContainerMetrics.java
index 60f6604..6966489 100644
--- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/monitor/TestContainerMetrics.java
+++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-server/hadoop-yarn-server-nodemanager/src/test/java/org/apache/hadoop/yarn/server/nodemanager/containermanager/monitor/TestContainerMetrics.java
@@ -20,7 +20,6 @@ package org.apache.hadoop.yarn.server.nodemanager.containermanager.monitor;
 
 import org.apache.hadoop.metrics2.AbstractMetric;
 import org.apache.hadoop.metrics2.MetricsRecord;
-import org.apache.hadoop.metrics2.MetricsSystem;
 import org.apache.hadoop.metrics2.impl.MetricsCollectorImpl;
 import org.apache.hadoop.metrics2.impl.MetricsRecords;
 import org.apache.hadoop.metrics2.impl.MetricsSystemImpl;
@@ -37,9 +36,6 @@ import java.util.Set;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyString;
-import static org.mockito.Mockito.doReturn;
 import static org.mockito.Mockito.mock;
 
 public class TestContainerMetrics {
@@ -48,10 +44,6 @@ public class TestContainerMetrics {
   public void testContainerMetricsFlow() throws InterruptedException {
     final String ERR = "Error in number of records";
 
-    // Create a dummy MetricsSystem
-    MetricsSystem system = mock(MetricsSystem.class);
-    doReturn(this).when(system).register(anyString(), anyString(), any());
-
     MetricsCollectorImpl collector = new MetricsCollectorImpl();
     ContainerId containerId = mock(ContainerId.class);
     ContainerMetrics metrics = ContainerMetrics.forContainer(containerId,
@@ -89,9 +81,6 @@ public class TestContainerMetrics {
   public void testContainerMetricsLimit() throws InterruptedException {
     final String ERR = "Error in number of records";
 
-    MetricsSystem system = mock(MetricsSystem.class);
-    doReturn(this).when(system).register(anyString(), anyString(), any());
-
     MetricsCollectorImpl collector = new MetricsCollectorImpl();
     ContainerId containerId = mock(ContainerId.class);
     ContainerMetrics metrics = ContainerMetrics.forContainer(containerId,


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message