hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jl...@apache.org
Subject hadoop git commit: MAPREDUCE-6641. TestTaskAttempt fails in trunk. Contributed by Haibo Chen.
Date Tue, 29 Aug 2017 18:01:28 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2.8 37da90b17 -> fe4aff733


MAPREDUCE-6641. TestTaskAttempt fails in trunk. Contributed by Haibo Chen.

(cherry picked from commit cd08aa72a6042a837edb17bc1ae98a651d969a43)


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/fe4aff73
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/fe4aff73
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/fe4aff73

Branch: refs/heads/branch-2.8
Commit: fe4aff73301a83588d9360bfbf8e557f5eff4c20
Parents: 37da90b
Author: Jason Lowe <jlowe@apache.org>
Authored: Tue Aug 29 12:24:42 2017 -0500
Committer: Jason Lowe <jlowe@apache.org>
Committed: Tue Aug 29 12:54:32 2017 -0500

----------------------------------------------------------------------
 .../v2/app/job/impl/TestTaskAttempt.java          | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/fe4aff73/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/job/impl/TestTaskAttempt.java
----------------------------------------------------------------------
diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/job/impl/TestTaskAttempt.java
b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/job/impl/TestTaskAttempt.java
index ac7c49c..c53bee0 100644
--- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/job/impl/TestTaskAttempt.java
+++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-app/src/test/java/org/apache/hadoop/mapreduce/v2/app/job/impl/TestTaskAttempt.java
@@ -18,6 +18,7 @@
 
 package org.apache.hadoop.mapreduce.v2.app.job.impl;
 
+import static org.apache.hadoop.test.GenericTestUtils.waitFor;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertTrue;
@@ -33,6 +34,7 @@ import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
 
+import com.google.common.base.Supplier;
 import org.junit.Assert;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileStatus;
@@ -380,7 +382,7 @@ public class TestTaskAttempt{
   }
 
   private void testTaskAttemptAssignedKilledHistory
-      (FailingAttemptsDuringAssignedMRApp app) throws Exception {
+      (final FailingAttemptsDuringAssignedMRApp app) throws Exception {
     Configuration conf = new Configuration();
     Job job = app.submit(conf);
     app.waitForState(job, JobState.RUNNING);
@@ -390,8 +392,18 @@ public class TestTaskAttempt{
     Map<TaskAttemptId, TaskAttempt> attempts = task.getAttempts();
     TaskAttempt attempt = attempts.values().iterator().next();
     app.waitForState(attempt, TaskAttemptState.KILLED);
-    Assert.assertTrue("No Ta Started JH Event", app.getTaStartJHEvent());
-    Assert.assertTrue("No Ta Killed JH Event", app.getTaKilledJHEvent());
+    waitFor(new Supplier<Boolean>() {
+      @Override
+      public Boolean get() {
+        return app.getTaStartJHEvent();
+      }
+    }, 100, 800);
+    waitFor(new Supplier<Boolean>() {
+      @Override
+      public Boolean get() {
+        return app.getTaKilledJHEvent();
+      }
+    }, 100, 800);
   }
 
   static class FailingAttemptsMRApp extends MRApp {


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org


Mime
View raw message