MAPREDUCE-7136. TestMRAppMetrics should shutdown DefaultMetricsSystem after completion. Contributed by Oleksandr Shevchenko

This commit is contained in:
Jason Lowe 2018-09-11 13:10:50 -05:00
parent 8ffbbf51c9
commit 598380ad5a

View File

@ -24,12 +24,19 @@
import static org.apache.hadoop.test.MetricsAsserts.*;
import org.apache.hadoop.metrics2.lib.DefaultMetricsSystem;
import org.junit.After;
import org.junit.Test;
import static org.mockito.Mockito.*;
public class TestMRAppMetrics {
@After
public void tearDown() {
DefaultMetricsSystem.shutdown();
}
@Test public void testNames() {
Job job = mock(Job.class);
Task mapTask = mock(Task.class);