YARN-5107. TestContainerMetrics fails. (aajisaka)
This commit is contained in:
parent
1597630681
commit
d4274c64bc
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue