Skip to content

Commit

Permalink
fixed all non-idempotent tests in MapReduce
Browse files Browse the repository at this point in the history
  • Loading branch information
kaiyaok2 committed May 4, 2024
1 parent 782c1fe commit 6e7c3ec
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,8 @@ public void testAttempts() {
appController.attempts();

assertEquals(AttemptsPage.class, appController.getClazz());

appController.getProperty().remove(AMParams.ATTEMPT_STATE);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
import org.apache.hadoop.mapreduce.TaskType;
import org.apache.hadoop.util.Progress;
import org.junit.After;
import org.junit.Before;
import org.junit.Assert;
import org.junit.Rule;
import org.junit.Test;
Expand All @@ -52,6 +53,13 @@ public class TestMapTask {
System.getProperty("java.io.tmpdir", "/tmp")),
TestMapTask.class.getName());

@Before
public void setup() throws Exception {
if(!TEST_ROOT_DIR.exists()) {
TEST_ROOT_DIR.mkdirs();
}
}

Check failure on line 61 in hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/test/java/org/apache/hadoop/mapred/TestMapTask.java

View check run for this annotation

ASF Cloudbees Jenkins ci-hadoop / Apache Yetus

hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/test/java/org/apache/hadoop/mapred/TestMapTask.java#L61

blanks: end of line

Check failure on line 62 in hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/test/java/org/apache/hadoop/mapred/TestMapTask.java

View check run for this annotation

ASF Cloudbees Jenkins ci-hadoop / Apache Yetus

hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-core/src/test/java/org/apache/hadoop/mapred/TestMapTask.java#L62

blanks: end of line
@After
public void cleanup() throws Exception {
FileUtil.fullyDelete(TEST_ROOT_DIR);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import org.apache.hadoop.mapreduce.checkpoint.TaskCheckpointID;
import org.apache.hadoop.util.ExitUtil;
import org.junit.After;
import org.junit.Before;
import org.junit.Assert;
import org.junit.Test;

Expand Down Expand Up @@ -180,6 +181,11 @@ protected void checkTaskLimits() throws TaskLimitException {
}
}

@Before
public void setup() {
statusUpdateTimes = 0;
}

@After
public void cleanup() {
FileSystem.clearStatistics();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ public void setUp() throws Exception {
@After
public void tearDown() throws Exception {
stopHttpServer();
NotificationServlet.counter = 0;
NotificationServlet.failureCounter = 0;
super.tearDown();
}

Expand Down

0 comments on commit 6e7c3ec

Please sign in to comment.