From 8f70d48d14f5d266eea042eb70cd3c22838fbf51 Mon Sep 17 00:00:00 2001 From: lzx404243 Date: Wed, 1 Sep 2021 00:47:09 -0400 Subject: [PATCH] MAPREDUCE-7311. Clear filesystem statistics after tests in TestTaskProgressReporter (#2500) Co-authored-by: Zhengxi Li (cherry picked from commit 6187f76f11e885023c99382f0fd18f8fea8bcbb6) --- .../org/apache/hadoop/mapred/TestTaskProgressReporter.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/test/java/org/apache/hadoop/mapred/TestTaskProgressReporter.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/test/java/org/apache/hadoop/mapred/TestTaskProgressReporter.java index e5ff64e3179..a6aea6f720f 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/test/java/org/apache/hadoop/mapred/TestTaskProgressReporter.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/test/java/org/apache/hadoop/mapred/TestTaskProgressReporter.java @@ -34,6 +34,7 @@ import org.apache.hadoop.mapreduce.MRConfig; import org.apache.hadoop.mapreduce.MRJobConfig; import org.apache.hadoop.mapreduce.checkpoint.TaskCheckpointID; import org.apache.hadoop.util.ExitUtil; +import org.junit.After; import org.junit.Assert; import org.junit.Test; @@ -177,6 +178,11 @@ public class TestTaskProgressReporter { } } + @After + public void cleanup() { + FileSystem.clearStatistics(); + } + @Test(timeout=60000) public void testScratchDirSize() throws Exception { String tmpPath = TEST_DIR + "/testBytesWrittenLimit-tmpFile-"