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
1 changed files with 7 additions and 0 deletions

View File

@ -24,12 +24,19 @@ import org.apache.hadoop.metrics2.MetricsRecordBuilder;
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);