tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hit...@apache.org
Subject git commit: TEZ-977. Flaky test: TestAMNodeMap - add more debug logging. (hitesh)
Date Tue, 25 Mar 2014 19:38:41 GMT
Repository: incubator-tez
Updated Branches:
  refs/heads/master e22256ddf -> ba97f7f35


TEZ-977. Flaky test: TestAMNodeMap - add more debug logging. (hitesh)


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

Branch: refs/heads/master
Commit: ba97f7f35af0ca94a966a30bb138d7f3ef9e2562
Parents: e22256d
Author: Hitesh Shah <hitesh@apache.org>
Authored: Tue Mar 25 12:38:17 2014 -0700
Committer: Hitesh Shah <hitesh@apache.org>
Committed: Tue Mar 25 12:38:17 2014 -0700

----------------------------------------------------------------------
 .../apache/tez/dag/app/rm/node/TestAMNodeMap.java    | 15 ++++++++++++++-
 1 file changed, 14 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tez/blob/ba97f7f3/tez-dag/src/test/java/org/apache/tez/dag/app/rm/node/TestAMNodeMap.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/test/java/org/apache/tez/dag/app/rm/node/TestAMNodeMap.java b/tez-dag/src/test/java/org/apache/tez/dag/app/rm/node/TestAMNodeMap.java
index 506f213..84b3dad 100644
--- a/tez-dag/src/test/java/org/apache/tez/dag/app/rm/node/TestAMNodeMap.java
+++ b/tez-dag/src/test/java/org/apache/tez/dag/app/rm/node/TestAMNodeMap.java
@@ -23,6 +23,8 @@ import static org.mockito.Mockito.mock;
 
 import java.util.List;
 
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.yarn.api.records.ContainerId;
 import org.apache.hadoop.yarn.api.records.NodeId;
@@ -50,6 +52,8 @@ import com.google.common.collect.Lists;
 @SuppressWarnings({ "resource", "rawtypes" })
 public class TestAMNodeMap {
 
+  private static final Log LOG = LogFactory.getLog(TestAMNodeMap.class);
+
   DrainDispatcher dispatcher;
   EventHandler eventHandler;
   
@@ -113,7 +117,7 @@ public class TestAMNodeMap {
     // the log message for verification.
   }
   
-  @Test(timeout=5000)
+  @Test(timeout=10000)
   public void testNodeSelfBlacklist() throws InterruptedException {
     AppContext appContext = mock(AppContext.class);
     Configuration conf = new Configuration(false);
@@ -222,10 +226,19 @@ public class TestAMNodeMap {
     handler.events.clear();
     amNodeMap.handle(new AMNodeEventNodeCountUpdated(8));
     dispatcher.await();
+    Thread.sleep(1000l);
+    dispatcher.await();
+    LOG.info(("Completed waiting for dispatcher to process all pending events"));
     assertEquals(AMNodeState.BLACKLISTED, node.getState());
     assertEquals(AMNodeState.BLACKLISTED, node2.getState());
     assertEquals(AMNodeState.ACTIVE, node3.getState());
     assertEquals(8, handler.events.size());
+
+    int index = 0;
+    for (Event event : handler.events) {
+      LOG.info("Logging event: index:" + index++
+          + " type: " + event.getType());
+    }
     assertEquals(AMNodeEventType.N_IGNORE_BLACKLISTING_DISABLED, handler.events.get(0).getType());
     assertEquals(AMNodeEventType.N_IGNORE_BLACKLISTING_DISABLED, handler.events.get(1).getType());
     assertEquals(AMNodeEventType.N_IGNORE_BLACKLISTING_DISABLED, handler.events.get(2).getType());


Mime
View raw message