tez-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zjf...@apache.org
Subject [2/2] tez git commit: TEZ-1762. Lots of unit tests do not have timeout parameter set (zjffdu)
Date Tue, 23 Dec 2014 01:38:45 GMT
TEZ-1762. Lots of unit tests do not have timeout parameter set (zjffdu)

(cherry picked from commit 45a443166d2a1ffdfc6e5d14b386fd20f4e72365)


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

Branch: refs/heads/branch-0.6
Commit: a23e740db77810df68e9fc092297bf2c0fc8f4f7
Parents: e5e10a6
Author: Jeff Zhang <zjffdu@apache.org>
Authored: Tue Dec 23 09:31:28 2014 +0800
Committer: Jeff Zhang <zjffdu@apache.org>
Committed: Tue Dec 23 09:38:11 2014 +0800

----------------------------------------------------------------------
 CHANGES.txt                                     |  1 +
 .../apache/tez/common/TestReflectionUtils.java  |  4 +--
 .../apache/tez/common/TestTezCommonUtils.java   | 26 +++++++-------
 .../org/apache/tez/common/TestTezYARNUtils.java |  4 +--
 .../org/apache/tez/common/TestVersionInfo.java  |  8 ++---
 .../security/TestACLConfigurationParser.java    |  6 ++--
 .../tez/common/security/TestACLManager.java     | 16 ++++-----
 .../common/security/TestDAGAccessControls.java  | 10 +++---
 .../tez/common/security/TestTokenCache.java     |  2 +-
 .../tez/dag/api/TestDagTypeConverters.java      |  2 +-
 .../tez/dag/api/TestTezConfiguration.java       |  2 +-
 .../tez/dag/api/client/TestATSHttpClient.java   |  6 ++--
 .../tez/dag/api/client/rpc/TestDAGClient.java   | 12 +++----
 .../event/TestCompositeDataMovementEvent.java   |  4 +--
 .../tez/common/TestEnvironmentUpdateUtils.java  |  4 +--
 .../org/apache/tez/dag/records/TestTezIds.java  |  2 +-
 .../tez/dag/api/client/TestDAGClientServer.java |  2 +-
 .../dag/api/client/TestVertexStatusBuilder.java |  2 +-
 .../apache/tez/dag/app/TestRecoveryParser.java  |  4 +--
 .../tez/dag/app/dag/impl/TestDAGRecovery.java   | 24 ++++++-------
 .../dag/impl/TestRootInputVertexManager.java    |  4 +--
 .../tez/dag/app/dag/impl/TestTaskAttempt.java   |  2 +-
 .../app/dag/impl/TestTaskAttemptRecovery.java   | 12 +++----
 .../tez/dag/app/dag/impl/TestTaskImpl.java      | 34 +++++++++---------
 .../tez/dag/app/dag/impl/TestTaskRecovery.java  | 38 ++++++++++----------
 .../tez/dag/app/dag/impl/TestVertexManager.java |  4 +--
 .../dag/app/dag/impl/TestVertexRecovery.java    | 28 +++++++--------
 .../tez/dag/app/dag/impl/TestVertexStats.java   |  2 +-
 .../speculation/legacy/TestDataStatistics.java  |  8 ++---
 .../tez/dag/app/rm/TestLocalTaskScheduler.java  |  2 +-
 .../tez/dag/app/rm/TestTaskScheduler.java       |  2 +-
 .../TestHistoryEventsProtoConversion.java       |  2 +-
 .../impl/TestHistoryEventJsonConversion.java    |  4 +--
 .../tez/dag/history/utils/TestDAGUtils.java     |  2 +-
 .../TestSimple2LevelVersionComparator.java      |  6 ++--
 .../tez/runtime/task/TestTaskExecution.java     | 14 ++++----
 .../common/TestMRInputSplitDistributor.java     |  4 +--
 .../hadoop/TestConfigTranslationMRToTez.java    |  4 +--
 .../mapreduce/hadoop/TestDeprecatedKeys.java    |  4 +--
 .../tez/mapreduce/hadoop/TestMRHelpers.java     | 14 ++++----
 .../mapreduce/hadoop/TestMRInputHelpers.java    |  6 ++--
 .../processor/map/TestMapProcessor.java         |  2 +-
 .../processor/reduce/TestReduceProcessor.java   |  2 +-
 .../ats/TestHistoryEventTimelineConversion.java | 22 ++++++------
 .../TestLogicalIOProcessorRuntimeTask.java      |  2 +-
 .../objectregistry/TestObjectRegistry.java      |  4 +--
 .../api/TestTezRuntimeConfiguration.java        |  2 +-
 .../library/common/TestInputIdentifiers.java    |  2 +-
 .../common/comparator/TestProxyComparator.java  |  2 +-
 .../impl/TestShuffleInputEventHandlerImpl.java  |  8 ++---
 .../impl/TestSimpleFetchedInputAllocator.java   |  2 +-
 .../shuffle/orderedgrouped/TestFetcher.java     |  2 +-
 .../TestShuffleInputEventHandler.java           | 10 +++---
 .../library/common/sort/impl/TestIFile.java     | 24 ++++++-------
 .../TestOrderedGroupedMergedKVInputConfig.java  |  8 ++---
 .../TestOrderedPartitionedKVEdgeConfig.java     |  2 +-
 .../TestOrderedPartitionedKVOutputConfig.java   | 10 +++---
 .../conf/TestUnorderedKVInputConfig.java        |  6 ++--
 .../conf/TestUnorderedKVOutputConfig.java       |  6 ++--
 .../TestUnorderedPartitionedKVOutputConfig.java |  8 ++---
 .../input/TestSortedGroupedMergedInput.java     | 14 ++++----
 .../library/output/TestOnFileSortedOutput.java  |  8 ++---
 .../output/TestOnFileUnorderedKVOutput.java     |  2 +-
 .../apache/tez/mapreduce/TestMRRJobsDAGApi.java |  2 +-
 64 files changed, 244 insertions(+), 243 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/a23e740d/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 2827b8d..5269d5a 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -6,6 +6,7 @@ Release 0.6.0: Unreleased
 INCOMPATIBLE CHANGES
 
 ALL CHANGES:
+  TEZ-1762. Lots of unit tests do not have timeout parameter set.
   TEZ-1886. remove deprecation warnings for tez-ui on the console.
   TEZ-1875. dropdown filters do not work on vertices and task attempts page.
   TEZ-1873. TestTezAMRMClient fails due to host resolution timing out.

http://git-wip-us.apache.org/repos/asf/tez/blob/a23e740d/tez-api/src/test/java/org/apache/tez/common/TestReflectionUtils.java
----------------------------------------------------------------------
diff --git a/tez-api/src/test/java/org/apache/tez/common/TestReflectionUtils.java b/tez-api/src/test/java/org/apache/tez/common/TestReflectionUtils.java
index 3f7846d..253e3a7 100644
--- a/tez-api/src/test/java/org/apache/tez/common/TestReflectionUtils.java
+++ b/tez-api/src/test/java/org/apache/tez/common/TestReflectionUtils.java
@@ -44,7 +44,7 @@ public class TestReflectionUtils {
     }
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testConstructorWithParameters()
   {
     Class<?>[] parameterTypes = new Class[] { String.class, Integer.TYPE };
@@ -55,7 +55,7 @@ public class TestReflectionUtils {
     assertEquals("Class not constructed with second parameter correctly", instance.second, 1);
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testAddResourceToClasspath() throws IOException, TezException {
 
     String rsrcName = "dummyfile.xml";

http://git-wip-us.apache.org/repos/asf/tez/blob/a23e740d/tez-api/src/test/java/org/apache/tez/common/TestTezCommonUtils.java
----------------------------------------------------------------------
diff --git a/tez-api/src/test/java/org/apache/tez/common/TestTezCommonUtils.java b/tez-api/src/test/java/org/apache/tez/common/TestTezCommonUtils.java
index e8c4f74..db11178 100644
--- a/tez-api/src/test/java/org/apache/tez/common/TestTezCommonUtils.java
+++ b/tez-api/src/test/java/org/apache/tez/common/TestTezCommonUtils.java
@@ -80,7 +80,7 @@ public class TestTezCommonUtils {
   }
 
   // Testing base staging dir
-  @Test
+  @Test(timeout = 5000)
   public void testTezBaseStagingPath() throws Exception {
     Configuration localConf = new Configuration();
     // Check if default works with localFS
@@ -96,7 +96,7 @@ public class TestTezCommonUtils {
   }
 
   // Testing System staging dir if createed
-  @Test
+  @Test(timeout = 5000)
   public void testCreateTezSysStagingPath() throws Exception {
     String strAppId = "testAppId";
     String expectedStageDir = RESOLVED_STAGE_DIR + Path.SEPARATOR
@@ -116,7 +116,7 @@ public class TestTezCommonUtils {
   }
 
   // Testing System staging dir
-  @Test
+  @Test(timeout = 5000)
   public void testTezSysStagingPath() throws Exception {
     String strAppId = "testAppId";
     Path stageDir = TezCommonUtils.getTezSystemStagingPath(conf, strAppId);
@@ -126,7 +126,7 @@ public class TestTezCommonUtils {
   }
 
   // Testing conf staging dir
-  @Test
+  @Test(timeout = 5000)
   public void testTezConfStagingPath() throws Exception {
     String strAppId = "testAppId";
     Path stageDir = TezCommonUtils.getTezSystemStagingPath(conf, strAppId);
@@ -138,7 +138,7 @@ public class TestTezCommonUtils {
   }
 
   // Testing session jars staging dir
-  @Test
+  @Test(timeout = 5000)
   public void testTezSessionJarStagingPath() throws Exception {
     String strAppId = "testAppId";
     Path stageDir = TezCommonUtils.getTezSystemStagingPath(conf, strAppId);
@@ -150,7 +150,7 @@ public class TestTezCommonUtils {
   }
 
   // Testing bin plan staging dir
-  @Test
+  @Test(timeout = 5000)
   public void testTezBinPlanStagingPath() throws Exception {
     String strAppId = "testAppId";
     Path stageDir = TezCommonUtils.getTezSystemStagingPath(conf, strAppId);
@@ -162,7 +162,7 @@ public class TestTezCommonUtils {
   }
 
   // Testing text plan staging dir
-  @Test
+  @Test(timeout = 5000)
   public void testTezTextPlanStagingPath() throws Exception {
     String strAppId = "testAppId";
     String dagPBName = "testDagPBName";
@@ -176,7 +176,7 @@ public class TestTezCommonUtils {
   }
 
   // Testing recovery path staging dir
-  @Test
+  @Test(timeout = 5000)
   public void testTezRecoveryStagingPath() throws Exception {
     String strAppId = "testAppId";
     Path stageDir = TezCommonUtils.getTezSystemStagingPath(conf, strAppId);
@@ -188,7 +188,7 @@ public class TestTezCommonUtils {
   }
 
   // Testing app attempt specific recovery path staging dir
-  @Test
+  @Test(timeout = 5000)
   public void testTezAttemptRecoveryStagingPath() throws Exception {
     String strAppId = "testAppId";
     Path stageDir = TezCommonUtils.getTezSystemStagingPath(conf, strAppId);
@@ -202,7 +202,7 @@ public class TestTezCommonUtils {
   }
 
   // Testing DAG specific recovery path staging dir
-  @Test
+  @Test(timeout = 5000)
   public void testTezDAGRecoveryStagingPath() throws Exception {
     String strAppId = "testAppId";
     Path stageDir = TezCommonUtils.getTezSystemStagingPath(conf, strAppId);
@@ -219,7 +219,7 @@ public class TestTezCommonUtils {
   }
 
   // Testing Summary recovery path staging dir
-  @Test
+  @Test(timeout = 5000)
   public void testTezSummaryRecoveryStagingPath() throws Exception {
     String strAppId = "testAppId";
     Path stageDir = TezCommonUtils.getTezSystemStagingPath(conf, strAppId);
@@ -235,12 +235,12 @@ public class TestTezCommonUtils {
   }
 
   // This test is running here to leverage existing mini cluster
-  @Test
+  @Test(timeout = 5000)
   public void testLocalResourceVisibility() throws Exception {
     TestTezClientUtils.testLocalResourceVisibility(dfsCluster.getFileSystem(), conf);
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testStringTokenize() {
     String s = "foo:bar:xyz::too";
     String[] expectedTokens = { "foo", "bar" , "xyz" , "too"};

http://git-wip-us.apache.org/repos/asf/tez/blob/a23e740d/tez-api/src/test/java/org/apache/tez/common/TestTezYARNUtils.java
----------------------------------------------------------------------
diff --git a/tez-api/src/test/java/org/apache/tez/common/TestTezYARNUtils.java b/tez-api/src/test/java/org/apache/tez/common/TestTezYARNUtils.java
index 5edcdcd..6534cb6 100644
--- a/tez-api/src/test/java/org/apache/tez/common/TestTezYARNUtils.java
+++ b/tez-api/src/test/java/org/apache/tez/common/TestTezYARNUtils.java
@@ -29,7 +29,7 @@ import org.junit.Test;
 
 public class TestTezYARNUtils {
 
-  @Test
+  @Test(timeout = 5000)
   public void testAuxClasspath() {
     Configuration conf = new Configuration(false);
     conf.set(TezConfiguration.TEZ_CLUSTER_ADDITIONAL_CLASSPATH_PREFIX, "foobar");
@@ -41,7 +41,7 @@ public class TestTezYARNUtils {
         classpath.indexOf(Environment.PWD.$()));
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testBasicArchiveClasspath() {
     Configuration conf = new Configuration(false);
     String classpath = TezYARNUtils.getFrameworkClasspath(conf, true);

http://git-wip-us.apache.org/repos/asf/tez/blob/a23e740d/tez-api/src/test/java/org/apache/tez/common/TestVersionInfo.java
----------------------------------------------------------------------
diff --git a/tez-api/src/test/java/org/apache/tez/common/TestVersionInfo.java b/tez-api/src/test/java/org/apache/tez/common/TestVersionInfo.java
index d1d3ae7..17ff3d1 100644
--- a/tez-api/src/test/java/org/apache/tez/common/TestVersionInfo.java
+++ b/tez-api/src/test/java/org/apache/tez/common/TestVersionInfo.java
@@ -31,7 +31,7 @@ public class TestVersionInfo {
   final String buildTime = "20141024-1052";
   final String scmUrl = "scm:git:https://git-wip-us.apache.org/repos/asf/tez.git";
 
-  @Test
+  @Test(timeout = 5000)
   public void testTest1File() {
     VersionInfo versionInfo = new VersionInfo("test1");
     Assert.assertEquals(version, versionInfo.getVersion());
@@ -40,7 +40,7 @@ public class TestVersionInfo {
     Assert.assertEquals(scmUrl, versionInfo.getSCMURL());
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testTest2File() {
     VersionInfo versionInfo = new VersionInfo("test2");
     Assert.assertEquals(version, versionInfo.getVersion());
@@ -49,7 +49,7 @@ public class TestVersionInfo {
     Assert.assertEquals(VersionInfo.UNKNOWN, versionInfo.getSCMURL());
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testTest3File() {
     VersionInfo versionInfo = new VersionInfo("test3");
     Assert.assertEquals(version, versionInfo.getVersion());
@@ -58,7 +58,7 @@ public class TestVersionInfo {
     Assert.assertEquals(scmUrl, versionInfo.getSCMURL());
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testNonExistentFile() {
     VersionInfo versionInfo = new VersionInfo("test4");
   }

http://git-wip-us.apache.org/repos/asf/tez/blob/a23e740d/tez-api/src/test/java/org/apache/tez/common/security/TestACLConfigurationParser.java
----------------------------------------------------------------------
diff --git a/tez-api/src/test/java/org/apache/tez/common/security/TestACLConfigurationParser.java b/tez-api/src/test/java/org/apache/tez/common/security/TestACLConfigurationParser.java
index 08a3552..a535d18 100644
--- a/tez-api/src/test/java/org/apache/tez/common/security/TestACLConfigurationParser.java
+++ b/tez-api/src/test/java/org/apache/tez/common/security/TestACLConfigurationParser.java
@@ -26,7 +26,7 @@ import org.junit.Test;
 
 public class TestACLConfigurationParser {
 
-  @Test
+  @Test(timeout = 5000)
   public void testACLConfigParser() {
 
     Configuration conf = new Configuration(false);
@@ -64,7 +64,7 @@ public class TestACLConfigurationParser {
 
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testGroupsOnly() {
     Configuration conf = new Configuration(false);
     String viewACLs = "     grp3,grp4,grp5";
@@ -78,7 +78,7 @@ public class TestACLConfigurationParser {
     Assert.assertTrue(parser.getAllowedGroups().get(ACLType.AM_VIEW_ACL).contains("grp5"));
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testDAGACLConfigParser() {
 
     Configuration conf = new Configuration(false);

http://git-wip-us.apache.org/repos/asf/tez/blob/a23e740d/tez-api/src/test/java/org/apache/tez/common/security/TestACLManager.java
----------------------------------------------------------------------
diff --git a/tez-api/src/test/java/org/apache/tez/common/security/TestACLManager.java b/tez-api/src/test/java/org/apache/tez/common/security/TestACLManager.java
index bc35b51..56cd465 100644
--- a/tez-api/src/test/java/org/apache/tez/common/security/TestACLManager.java
+++ b/tez-api/src/test/java/org/apache/tez/common/security/TestACLManager.java
@@ -36,7 +36,7 @@ public class TestACLManager {
 
   private static final String[] noGroups = new String[0];
 
-  @Test
+  @Test(timeout = 5000)
   public void testCurrentUserACLChecks() {
     UserGroupInformation currentUser = UserGroupInformation.createUserForTesting("currentUser", noGroups);
     UserGroupInformation dagUser = UserGroupInformation.createUserForTesting("dagUser", noGroups);
@@ -74,7 +74,7 @@ public class TestACLManager {
     Assert.assertFalse(dagAclManager.checkAccess(user, ACLType.DAG_MODIFY_ACL));
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testOtherUserACLChecks() throws IOException {
     String[] groups1 = new String[] {"grp1", "grp2"};
     String[] groups2 = new String[] {"grp3", "grp4"};
@@ -116,7 +116,7 @@ public class TestACLManager {
     Assert.assertFalse(aclManager.checkAccess(user6, ACLType.AM_MODIFY_ACL));
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testNoGroupsACLChecks() throws IOException {
     String[] groups1 = new String[] {"grp1", "grp2"};
     String[] groups2 = new String[] {"grp3", "grp4"};
@@ -156,7 +156,7 @@ public class TestACLManager {
     Assert.assertFalse(aclManager.checkAccess(user6, ACLType.AM_MODIFY_ACL));
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void checkAMACLs() throws IOException {
     String[] groups1 = new String[] {"grp1", "grp2"};
     String[] groups2 = new String[] {"grp3", "grp4"};
@@ -214,7 +214,7 @@ public class TestACLManager {
 
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void checkDAGACLs() throws IOException {
     String[] groups1 = new String[] {"grp1", "grp2"};
     String[] groups2 = new String[] {"grp3", "grp4"};
@@ -286,7 +286,7 @@ public class TestACLManager {
 
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testWildCardCheck() {
     Configuration conf = new Configuration(false);
     String viewACLs = "   *  ";
@@ -308,7 +308,7 @@ public class TestACLManager {
     Assert.assertTrue(aclManager.checkDAGModifyAccess(u1));
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testACLsDisabled() {
     Configuration conf = new Configuration(false);
     conf.setBoolean(TezConfiguration.TEZ_AM_ACLS_ENABLED, false);
@@ -341,7 +341,7 @@ public class TestACLManager {
     Assert.assertTrue(dagAclManager.checkDAGModifyAccess(u1));
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testConvertToYARNACLs() {
     String currentUser = "c1";
     Configuration conf = new Configuration(false);

http://git-wip-us.apache.org/repos/asf/tez/blob/a23e740d/tez-api/src/test/java/org/apache/tez/common/security/TestDAGAccessControls.java
----------------------------------------------------------------------
diff --git a/tez-api/src/test/java/org/apache/tez/common/security/TestDAGAccessControls.java b/tez-api/src/test/java/org/apache/tez/common/security/TestDAGAccessControls.java
index 574e81f..6afc83b 100644
--- a/tez-api/src/test/java/org/apache/tez/common/security/TestDAGAccessControls.java
+++ b/tez-api/src/test/java/org/apache/tez/common/security/TestDAGAccessControls.java
@@ -27,7 +27,7 @@ import org.junit.Test;
 
 public class TestDAGAccessControls {
 
-  @Test
+  @Test(timeout = 5000)
   public void testBasicSerializeToConf()  {
     DAGAccessControls dagAccessControls = new DAGAccessControls();
     dagAccessControls.setUsersWithViewACLs(Arrays.asList("u1"))
@@ -44,7 +44,7 @@ public class TestDAGAccessControls {
     Assert.assertEquals("u2 g2", conf.get(TezConstants.TEZ_DAG_MODIFY_ACLS));
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testWildCardSerializeToConf()  {
     DAGAccessControls dagAccessControls = new DAGAccessControls();
     dagAccessControls.setUsersWithViewACLs(Arrays.asList("*"))
@@ -61,7 +61,7 @@ public class TestDAGAccessControls {
     Assert.assertEquals("*", conf.get(TezConstants.TEZ_DAG_MODIFY_ACLS));
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testGroupsOnlySerializeToConf()  {
     DAGAccessControls dagAccessControls = new DAGAccessControls();
     dagAccessControls.setGroupsWithViewACLs(Arrays.asList("g1"))
@@ -76,7 +76,7 @@ public class TestDAGAccessControls {
     Assert.assertEquals(" g2", conf.get(TezConstants.TEZ_DAG_MODIFY_ACLS));
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testEmptySerializeToConf()  {
     DAGAccessControls dagAccessControls = new DAGAccessControls();
 
@@ -89,7 +89,7 @@ public class TestDAGAccessControls {
     Assert.assertEquals(" ", conf.get(TezConstants.TEZ_DAG_MODIFY_ACLS));
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testStringBasedConstructor() {
     DAGAccessControls dagAccessControls = new DAGAccessControls("u1 g1", "u2 g2");
 

http://git-wip-us.apache.org/repos/asf/tez/blob/a23e740d/tez-api/src/test/java/org/apache/tez/common/security/TestTokenCache.java
----------------------------------------------------------------------
diff --git a/tez-api/src/test/java/org/apache/tez/common/security/TestTokenCache.java b/tez-api/src/test/java/org/apache/tez/common/security/TestTokenCache.java
index 4706e8a..00c6842 100644
--- a/tez-api/src/test/java/org/apache/tez/common/security/TestTokenCache.java
+++ b/tez-api/src/test/java/org/apache/tez/common/security/TestTokenCache.java
@@ -51,7 +51,7 @@ public class TestTokenCache {
     renewer = Master.getMasterPrincipal(conf);
   }
 
-  @Test
+  @Test(timeout = 5000)
   @SuppressWarnings("deprecation")
   public void testBinaryCredentials() throws Exception {
     String binaryTokenFile = null;

http://git-wip-us.apache.org/repos/asf/tez/blob/a23e740d/tez-api/src/test/java/org/apache/tez/dag/api/TestDagTypeConverters.java
----------------------------------------------------------------------
diff --git a/tez-api/src/test/java/org/apache/tez/dag/api/TestDagTypeConverters.java b/tez-api/src/test/java/org/apache/tez/dag/api/TestDagTypeConverters.java
index 13347bb..41d92fe 100644
--- a/tez-api/src/test/java/org/apache/tez/dag/api/TestDagTypeConverters.java
+++ b/tez-api/src/test/java/org/apache/tez/dag/api/TestDagTypeConverters.java
@@ -28,7 +28,7 @@ import org.junit.Test;
 
 public class TestDagTypeConverters {
 
-  @Test
+  @Test(timeout = 5000)
   public void testTezEntityDescriptorSerialization() throws IOException {
     UserPayload payload = UserPayload.create(ByteBuffer.wrap(new String("Foobar").getBytes()), 100);
     String historytext = "Bar123";

http://git-wip-us.apache.org/repos/asf/tez/blob/a23e740d/tez-api/src/test/java/org/apache/tez/dag/api/TestTezConfiguration.java
----------------------------------------------------------------------
diff --git a/tez-api/src/test/java/org/apache/tez/dag/api/TestTezConfiguration.java b/tez-api/src/test/java/org/apache/tez/dag/api/TestTezConfiguration.java
index 05b3bc1..9ec4853 100644
--- a/tez-api/src/test/java/org/apache/tez/dag/api/TestTezConfiguration.java
+++ b/tez-api/src/test/java/org/apache/tez/dag/api/TestTezConfiguration.java
@@ -26,7 +26,7 @@ public class TestTezConfiguration {
 
   private static final String expectedValue = "tez.tar.gz";
 
-  @Test
+  @Test(timeout = 5000)
   public void testConstruction() {
     TezConfiguration tezConf1 = new TezConfiguration();
     Assert.assertEquals(expectedValue, tezConf1.get(TezConfiguration.TEZ_LIB_URIS));

http://git-wip-us.apache.org/repos/asf/tez/blob/a23e740d/tez-api/src/test/java/org/apache/tez/dag/api/client/TestATSHttpClient.java
----------------------------------------------------------------------
diff --git a/tez-api/src/test/java/org/apache/tez/dag/api/client/TestATSHttpClient.java b/tez-api/src/test/java/org/apache/tez/dag/api/client/TestATSHttpClient.java
index 0e3290f..2501797 100644
--- a/tez-api/src/test/java/org/apache/tez/dag/api/client/TestATSHttpClient.java
+++ b/tez-api/src/test/java/org/apache/tez/dag/api/client/TestATSHttpClient.java
@@ -40,7 +40,7 @@ import org.junit.Test;
 
 public class TestATSHttpClient {
 
-  @Test
+  @Test(timeout = 5000)
   public void testGetDagStatusThrowsExceptionOnEmptyJson() throws TezException {
     ApplicationId mockAppId = mock(ApplicationId.class);
     DAGClientTimelineImpl httpClient = new DAGClientTimelineImpl(mockAppId, "EXAMPLE_DAG_ID",
@@ -64,7 +64,7 @@ public class TestATSHttpClient {
     verify(spyClient).getJsonRootEntity(expectedDagUrl);
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testGetDagStatusSimple() throws TezException, JSONException, IOException {
     DAGClientTimelineImpl
         httpClient = new DAGClientTimelineImpl(mock(ApplicationId.class),"EXAMPLE_DAG_ID",
@@ -124,7 +124,7 @@ public class TestATSHttpClient {
     Assert.assertTrue("vertex name2", vertexProgress.containsKey("v2"));
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testGetVertexStatusSimple() throws JSONException, TezException, IOException {
     DAGClientTimelineImpl
         httpClient = new DAGClientTimelineImpl(mock(ApplicationId.class), "EXAMPLE_DAG_ID",

http://git-wip-us.apache.org/repos/asf/tez/blob/a23e740d/tez-api/src/test/java/org/apache/tez/dag/api/client/rpc/TestDAGClient.java
----------------------------------------------------------------------
diff --git a/tez-api/src/test/java/org/apache/tez/dag/api/client/rpc/TestDAGClient.java b/tez-api/src/test/java/org/apache/tez/dag/api/client/rpc/TestDAGClient.java
index a23c1d5..bad0d2e 100644
--- a/tez-api/src/test/java/org/apache/tez/dag/api/client/rpc/TestDAGClient.java
+++ b/tez-api/src/test/java/org/apache/tez/dag/api/client/rpc/TestDAGClient.java
@@ -196,14 +196,14 @@ public class TestDAGClient {
     realClient.proxy = mockProxy;
   }
   
-  @Test
+  @Test(timeout = 5000)
   public void testApp() throws IOException, TezException, ServiceException{
     assertTrue(dagClient.getExecutionContext().contains(mockAppId.toString()));
     DAGClientRPCImpl realClient = (DAGClientRPCImpl)((DAGClientImpl)dagClient).getRealClient();
     assertEquals(mockAppReport, realClient.getApplicationReportInternal());
   }
   
-  @Test
+  @Test(timeout = 5000)
   public void testDAGStatus() throws Exception{
     DAGStatus resultDagStatus = dagClient.getDAGStatus(null);
     verify(mockProxy, times(1)).getDAGStatus(null, GetDAGStatusRequestProto.newBuilder()
@@ -218,7 +218,7 @@ public class TestDAGClient {
     System.out.println("DAGStatusWithCounter:" + resultDagStatus);
   }
   
-  @Test
+  @Test(timeout = 5000)
   public void testVertexStatus() throws Exception{
     VertexStatus resultVertexStatus = dagClient.getVertexStatus("v1", null);
     verify(mockProxy).getVertexStatus(null, GetVertexStatusRequestProto.newBuilder()
@@ -234,14 +234,14 @@ public class TestDAGClient {
     System.out.println("VertexWithCounter:" + resultVertexStatus);
   }
   
-  @Test
+  @Test(timeout = 5000)
   public void testTryKillDAG() throws Exception{
     dagClient.tryKillDAG();
     verify(mockProxy, times(1)).tryKillDAG(null, TryKillDAGRequestProto.newBuilder()
         .setDagId(dagIdStr).build());
   }
   
-  @Test
+  @Test(timeout = 5000)
   public void testWaitForCompletion() throws Exception{
     // first time return DAG_RUNNING, second time return DAG_SUCCEEDED
     when(mockProxy.getDAGStatus(isNull(RpcController.class), any(GetDAGStatusRequestProto.class)))
@@ -255,7 +255,7 @@ public class TestDAGClient {
         .setDagId(dagIdStr).build());
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testWaitForCompletionWithStatusUpdates() throws Exception{
 
     // first time and second time return DAG_RUNNING, third time return DAG_SUCCEEDED

http://git-wip-us.apache.org/repos/asf/tez/blob/a23e740d/tez-api/src/test/java/org/apache/tez/runtime/api/event/TestCompositeDataMovementEvent.java
----------------------------------------------------------------------
diff --git a/tez-api/src/test/java/org/apache/tez/runtime/api/event/TestCompositeDataMovementEvent.java b/tez-api/src/test/java/org/apache/tez/runtime/api/event/TestCompositeDataMovementEvent.java
index f162d1d..eefbde7 100644
--- a/tez-api/src/test/java/org/apache/tez/runtime/api/event/TestCompositeDataMovementEvent.java
+++ b/tez-api/src/test/java/org/apache/tez/runtime/api/event/TestCompositeDataMovementEvent.java
@@ -27,7 +27,7 @@ import org.junit.Test;
 public class TestCompositeDataMovementEvent {
   ByteBuffer userPayload = ByteBuffer.wrap("Dummy userPayLoad".getBytes());
 
-  @Test
+  @Test(timeout = 5000)
   public void testGetCount(){
     int numPartitions = 2;
     int startIndex = 2;
@@ -37,7 +37,7 @@ public class TestCompositeDataMovementEvent {
     Assert.assertEquals(startIndex, cdme1.getSourceIndexStart());
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testGetEvents(){
     int numOutputs = 0;
     int startIndex = 1;

http://git-wip-us.apache.org/repos/asf/tez/blob/a23e740d/tez-common/src/test/java/org/apache/tez/common/TestEnvironmentUpdateUtils.java
----------------------------------------------------------------------
diff --git a/tez-common/src/test/java/org/apache/tez/common/TestEnvironmentUpdateUtils.java b/tez-common/src/test/java/org/apache/tez/common/TestEnvironmentUpdateUtils.java
index be241d0..a9cecc2 100644
--- a/tez-common/src/test/java/org/apache/tez/common/TestEnvironmentUpdateUtils.java
+++ b/tez-common/src/test/java/org/apache/tez/common/TestEnvironmentUpdateUtils.java
@@ -36,7 +36,7 @@ import java.util.concurrent.TimeUnit;
 
 public class TestEnvironmentUpdateUtils {
 
-  @Test
+  @Test(timeout = 5000)
   public void testMultipleUpdateEnvironment() {
     EnvironmentUpdateUtils.put("test.environment1", "test.value1");
     EnvironmentUpdateUtils.put("test.environment2", "test.value2");
@@ -44,7 +44,7 @@ public class TestEnvironmentUpdateUtils {
     assertEquals("Environment was not set propertly", "test.value2", System.getenv("test.environment2"));
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testConcurrentRequests() throws InterruptedException {
     int timeoutSecond = 5;
     int concurThread = 10;

http://git-wip-us.apache.org/repos/asf/tez/blob/a23e740d/tez-common/src/test/java/org/apache/tez/dag/records/TestTezIds.java
----------------------------------------------------------------------
diff --git a/tez-common/src/test/java/org/apache/tez/dag/records/TestTezIds.java b/tez-common/src/test/java/org/apache/tez/dag/records/TestTezIds.java
index dcf1309..3b582d1 100644
--- a/tez-common/src/test/java/org/apache/tez/dag/records/TestTezIds.java
+++ b/tez-common/src/test/java/org/apache/tez/dag/records/TestTezIds.java
@@ -79,7 +79,7 @@ public class TestTezIds {
     verifyAttemptInfo(splits, taId);
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testIdStringify() {
     ApplicationId appId = ApplicationId.newInstance(9999, 72);
     TezDAGID dagId = TezDAGID.getInstance(appId, 1);

http://git-wip-us.apache.org/repos/asf/tez/blob/a23e740d/tez-dag/src/test/java/org/apache/tez/dag/api/client/TestDAGClientServer.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/test/java/org/apache/tez/dag/api/client/TestDAGClientServer.java b/tez-dag/src/test/java/org/apache/tez/dag/api/client/TestDAGClientServer.java
index fd0bc7a..bf57cc1 100644
--- a/tez-dag/src/test/java/org/apache/tez/dag/api/client/TestDAGClientServer.java
+++ b/tez-dag/src/test/java/org/apache/tez/dag/api/client/TestDAGClientServer.java
@@ -34,7 +34,7 @@ import static org.junit.Assert.*;
 public class TestDAGClientServer {
 
   // try 10 times to allocate random port, fail it if no one is succeed.
-  @Test
+  @Test(timeout = 5000)
   public void testPortRange() {
     boolean succeedToAllocate = false;
     Random rand = new Random();

http://git-wip-us.apache.org/repos/asf/tez/blob/a23e740d/tez-dag/src/test/java/org/apache/tez/dag/api/client/TestVertexStatusBuilder.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/test/java/org/apache/tez/dag/api/client/TestVertexStatusBuilder.java b/tez-dag/src/test/java/org/apache/tez/dag/api/client/TestVertexStatusBuilder.java
index 0a3b9e0..521ed50 100644
--- a/tez-dag/src/test/java/org/apache/tez/dag/api/client/TestVertexStatusBuilder.java
+++ b/tez-dag/src/test/java/org/apache/tez/dag/api/client/TestVertexStatusBuilder.java
@@ -26,7 +26,7 @@ import org.junit.Test;
 
 public class TestVertexStatusBuilder {
 
-  @Test
+  @Test(timeout = 5000)
   public void testVertexStateConversion() {
     for (VertexState state : VertexState.values()) {
       DAGProtos.VertexStatusStateProto stateProto =

http://git-wip-us.apache.org/repos/asf/tez/blob/a23e740d/tez-dag/src/test/java/org/apache/tez/dag/app/TestRecoveryParser.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/test/java/org/apache/tez/dag/app/TestRecoveryParser.java b/tez-dag/src/test/java/org/apache/tez/dag/app/TestRecoveryParser.java
index 6bbfa0f..41ea071 100644
--- a/tez-dag/src/test/java/org/apache/tez/dag/app/TestRecoveryParser.java
+++ b/tez-dag/src/test/java/org/apache/tez/dag/app/TestRecoveryParser.java
@@ -56,7 +56,7 @@ public class TestRecoveryParser {
     return data;
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testGetLastCompletedDAG() {
     Map<TezDAGID, DAGSummaryData> summaryDataMap =
         new HashMap<TezDAGID, DAGSummaryData>();
@@ -72,7 +72,7 @@ public class TestRecoveryParser {
     assertEquals(lastCompletedDAGId, lastCompletedDAG.dagId.getId());
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testGetLastInProgressDAG() {
     Map<TezDAGID, DAGSummaryData> summaryDataMap =
         new HashMap<TezDAGID, DAGSummaryData>();

http://git-wip-us.apache.org/repos/asf/tez/blob/a23e740d/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestDAGRecovery.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestDAGRecovery.java b/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestDAGRecovery.java
index 1edefa7..58c55c2 100644
--- a/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestDAGRecovery.java
+++ b/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestDAGRecovery.java
@@ -154,7 +154,7 @@ public class TestDAGRecovery {
   /**
    * New -> RecoverTransition
    */
-  @Test
+  @Test(timeout = 5000)
   public void testDAGRecovery_FromNew() {
     assertNewState();
 
@@ -172,7 +172,7 @@ public class TestDAGRecovery {
   /**
    * restoreFromDAGInitializedEvent -> RecoverTransition
    */
-  @Test
+  @Test(timeout = 5000)
   public void testDAGRecovery_FromInited() {
     assertNewState();
     restoreFromDAGInitializedEvent();
@@ -197,7 +197,7 @@ public class TestDAGRecovery {
    * restoreFromDAGInitializedEvent -> restoreFromDAGStartedEvent ->
    * RecoverTransition
    */
-  @Test
+  @Test(timeout = 5000)
   public void testDAGRecovery_FromStarted() {
     assertNewState();
     restoreFromDAGInitializedEvent();
@@ -223,7 +223,7 @@ public class TestDAGRecovery {
    * restoreFromDAGInitializedEvent -> restoreFromDAGStartedEvent ->
    * restoreFromDAGFinishedEvent (SUCCEEDED) -> RecoverTransition
    */
-  @Test
+  @Test(timeout = 5000)
   public void testDAGRecovery_Finished_SUCCEEDED() {
     assertNewState();
     restoreFromDAGInitializedEvent();
@@ -256,7 +256,7 @@ public class TestDAGRecovery {
    * restoreFromDAGInitializedEvent -> restoreFromDAGStartedEvent ->
    * restoreFromDAGFinishedEvent(FAILED) -> RecoverTransition
    */
-  @Test
+  @Test(timeout = 5000)
   public void testDAGRecovery_Finished_FAILED() {
     assertNewState();
     restoreFromDAGInitializedEvent();
@@ -289,7 +289,7 @@ public class TestDAGRecovery {
    * restoreFromDAGInitializedEvent -> restoreFromDAGStartedEvent -> ->
    * restoreFromDAGFinishedEvent -> RecoverTransition
    */
-  @Test
+  @Test(timeout = 5000)
   public void testDAGRecovery_Finished_KILLED() {
     assertNewState();
     restoreFromDAGInitializedEvent();
@@ -322,7 +322,7 @@ public class TestDAGRecovery {
    * restoreFromDAGInitializedEvent -> restoreFromDAGStartedEvent -> ->
    * restoreFromDAGFinishedEvent -> RecoverTransition
    */
-  @Test
+  @Test(timeout = 5000)
   public void testDAGRecovery_Finished_ERROR() {
     assertNewState();
     restoreFromDAGInitializedEvent();
@@ -355,7 +355,7 @@ public class TestDAGRecovery {
    * restoreFromDAGInitializedEvent -> restoreFromDAGStartedEvent ->
    * restoreFromDAG_COMMIT_STARTED -> RecoverTransition
    */
-  @Test
+  @Test(timeout = 5000)
   public void testDAGRecovery_COMMIT_STARTED() {
     assertNewState();
     restoreFromDAGInitializedEvent();
@@ -389,7 +389,7 @@ public class TestDAGRecovery {
    * restoreFromDAG_COMMIT_STARTED -> -> restoreFromDAGFinished (SUCCEEDED)->
    * RecoverTransition
    */
-  @Test
+  @Test(timeout = 5000)
   public void testDAGRecovery_COMMIT_STARTED_Finished_SUCCEEDED() {
     assertNewState();
     restoreFromDAGInitializedEvent();
@@ -425,7 +425,7 @@ public class TestDAGRecovery {
    * restoreFromDAGInitializedEvent -> restoreFromDAGStartedEvent ->
    * restoreFromVERTEX_GROUP_COMMIT_STARTED -> RecoverTransition
    */
-  @Test
+  @Test(timeout = 5000)
   public void testDAGRecovery_GROUP_COMMIT_STARTED() {
     assertNewState();
     restoreFromDAGInitializedEvent();
@@ -459,7 +459,7 @@ public class TestDAGRecovery {
    * restoreFromVERTEX_GROUP_COMMIT_STARTED -> VERTEX_GROUP_COMMIT_FINISHED ->
    * RecoverTransition
    */
-  @Test
+  @Test(timeout = 5000)
   public void testDAGRecovery_GROUP_COMMIT_STARTED_FINISHED() {
     assertNewState();
     restoreFromDAGInitializedEvent();
@@ -482,7 +482,7 @@ public class TestDAGRecovery {
    * restoreFromVERTEX_GROUP_COMMIT_STARTED -> VERTEX_GROUP_COMMIT_FINISHED ->
    * restoreFromDAG_Finished -> RecoverTransition
    */
-  @Test
+  @Test(timeout = 5000)
   public void testDAGRecovery_GROUP_COMMIT_Finished() {
     assertNewState();
     restoreFromDAGInitializedEvent();

http://git-wip-us.apache.org/repos/asf/tez/blob/a23e740d/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestRootInputVertexManager.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestRootInputVertexManager.java b/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestRootInputVertexManager.java
index fc02bbf..344a1db 100644
--- a/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestRootInputVertexManager.java
+++ b/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestRootInputVertexManager.java
@@ -36,7 +36,7 @@ import org.junit.Test;
 
 public class TestRootInputVertexManager {
 
-  @Test
+  @Test(timeout = 5000)
   public void testEventsFromMultipleInputs() {
 
     VertexManagerPluginContext context = mock(VertexManagerPluginContext.class);
@@ -69,7 +69,7 @@ public class TestRootInputVertexManager {
     }
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testConfigureFromMultipleInputs() {
 
     VertexManagerPluginContext context = mock(VertexManagerPluginContext.class);

http://git-wip-us.apache.org/repos/asf/tez/blob/a23e740d/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestTaskAttempt.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestTaskAttempt.java b/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestTaskAttempt.java
index 5ab1158..224976c 100644
--- a/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestTaskAttempt.java
+++ b/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestTaskAttempt.java
@@ -671,7 +671,7 @@ public class TestTaskAttempt {
             expectedEvenstAfterTerminating), SpeculatorEventTaskAttemptStatusUpdate.class, 2);
   }
   
-  @Test//(timeout = 5000)
+  @Test(timeout = 5000)
   public void testSuccess() throws Exception {
     ApplicationId appId = ApplicationId.newInstance(1, 2);
     ApplicationAttemptId appAttemptId = ApplicationAttemptId.newInstance(

http://git-wip-us.apache.org/repos/asf/tez/blob/a23e740d/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestTaskAttemptRecovery.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestTaskAttemptRecovery.java b/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestTaskAttemptRecovery.java
index 100e8d9..e5fcd72 100644
--- a/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestTaskAttemptRecovery.java
+++ b/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestTaskAttemptRecovery.java
@@ -126,7 +126,7 @@ public class TestTaskAttemptRecovery {
   /**
    * No any event to restore -> RecoverTransition
    */
-  @Test
+  @Test(timeout = 5000)
   public void testTARecovery_NEW() {
     ta.handle(new TaskAttemptEvent(taId, TaskAttemptEventType.TA_RECOVER));
     assertEquals(TaskAttemptStateInternal.KILLED, ta.getInternalState());
@@ -143,7 +143,7 @@ public class TestTaskAttemptRecovery {
   /**
    * restoreFromTAStartEvent -> RecoverTransition
    */
-  @Test
+  @Test(timeout = 5000)
   public void testTARecovery_START() {
     restoreFromTAStartEvent();
 
@@ -163,7 +163,7 @@ public class TestTaskAttemptRecovery {
    * restoreFromTAStartEvent -> restoreFromTAFinished (SUCCEED)
    * -> RecoverTransition
    */
-  @Test
+  @Test(timeout = 5000)
   public void testTARecovery_SUCCEED() {
     restoreFromTAStartEvent();
     restoreFromTAFinishedEvent(TaskAttemptState.SUCCEEDED);
@@ -183,7 +183,7 @@ public class TestTaskAttemptRecovery {
    * restoreFromTAStartEvent -> restoreFromTAFinished (KILLED)
    * -> RecoverTransition
    */
-  @Test
+  @Test(timeout = 5000)
   public void testTARecovery_KIILED() {
     restoreFromTAStartEvent();
     restoreFromTAFinishedEvent(TaskAttemptState.KILLED);
@@ -203,7 +203,7 @@ public class TestTaskAttemptRecovery {
    * restoreFromTAStartEvent -> restoreFromTAFinished (FAILED)
    * -> RecoverTransition
    */
-  @Test
+  @Test(timeout = 5000)
   public void testTARecovery_FAILED() {
     restoreFromTAStartEvent();
     restoreFromTAFinishedEvent(TaskAttemptState.FAILED);
@@ -222,7 +222,7 @@ public class TestTaskAttemptRecovery {
   /**
    * restoreFromTAFinishedEvent ( no TAStartEvent before TAFinishedEvent )
    */
-  @Test
+  @Test(timeout = 5000)
   public void testRecover_FINISH_BUT_NO_START() {
     try {
       restoreFromTAFinishedEvent(TaskAttemptState.SUCCEEDED);

http://git-wip-us.apache.org/repos/asf/tez/blob/a23e740d/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestTaskImpl.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestTaskImpl.java b/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestTaskImpl.java
index e363dbd..fb1db0b 100644
--- a/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestTaskImpl.java
+++ b/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestTaskImpl.java
@@ -249,14 +249,14 @@ public class TestTaskImpl {
     assertEquals(TaskState.SUCCEEDED, mockTask.getState());
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testInit() {
     LOG.info("--- START: testInit ---");
     assertTaskNewState();
     assert (mockTask.getAttemptList().size() == 0);
   }
 
-  @Test
+  @Test(timeout = 5000)
   /**
    * {@link TaskState#NEW}->{@link TaskState#SCHEDULED}
    */
@@ -266,7 +266,7 @@ public class TestTaskImpl {
     scheduleTaskAttempt(taskId);
   }
 
-  @Test
+  @Test(timeout = 5000)
   /**
    * {@link TaskState#SCHEDULED}->{@link TaskState#KILL_WAIT}
    */
@@ -280,7 +280,7 @@ public class TestTaskImpl {
   /**
    * {@link TaskState#RUNNING}->{@link TaskState#KILLED}
    */
-  @Test
+  @Test(timeout = 5000)
   public void testKillRunningTask() {
     LOG.info("--- START: testKillRunningTask ---");
     TezTaskID taskId = getNewTaskID();
@@ -313,7 +313,7 @@ public class TestTaskImpl {
   /**
    * {@link TaskState#RUNNING}->{@link TaskState#KILLED}
    */
-  @Test
+  @Test(timeout = 5000)
   public void testKillRunningTaskButAttemptSucceeds() {
     LOG.info("--- START: testKillRunningTaskButAttemptSucceeds ---");
     TezTaskID taskId = getNewTaskID();
@@ -328,7 +328,7 @@ public class TestTaskImpl {
   /**
    * {@link TaskState#RUNNING}->{@link TaskState#KILLED}
    */
-  @Test
+  @Test(timeout = 5000)
   public void testKillRunningTaskButAttemptFails() {
     LOG.info("--- START: testKillRunningTaskButAttemptFails ---");
     TezTaskID taskId = getNewTaskID();
@@ -340,7 +340,7 @@ public class TestTaskImpl {
     assertEquals(TaskStateInternal.KILLED, mockTask.getInternalState());
   }
 
-  @Test
+  @Test(timeout = 5000)
   /**
    * Kill attempt
    * {@link TaskState#SCHEDULED}->{@link TaskState#SCHEDULED}
@@ -352,7 +352,7 @@ public class TestTaskImpl {
     killScheduledTaskAttempt(mockTask.getLastAttempt().getID());
   }
 
-  @Test
+  @Test(timeout = 5000)
   /**
    * Launch attempt
    * {@link TaskState#SCHEDULED}->{@link TaskState#RUNNING}
@@ -364,7 +364,7 @@ public class TestTaskImpl {
     launchTaskAttempt(mockTask.getLastAttempt().getID());
   }
 
-  @Test
+  @Test(timeout = 5000)
   /**
    * Kill running attempt
    * {@link TaskState#RUNNING}->{@link TaskState#RUNNING}
@@ -377,7 +377,7 @@ public class TestTaskImpl {
     killRunningTaskAttempt(mockTask.getLastAttempt().getID());
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testFetchedEventsModifyUnderlyingList() {
     // Tests to ensure that adding an event to a task, does not affect the
     // result of past getTaskAttemptTezEvents calls.
@@ -399,7 +399,7 @@ public class TestTaskImpl {
     assertEquals(6, fetchedList.size());
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testTaskProgress() {
     LOG.info("--- START: testTaskProgress ---");
 
@@ -438,7 +438,7 @@ public class TestTaskImpl {
     assert (mockTask.getProgress() == progress);
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testFailureDuringTaskAttemptCommit() {
     TezTaskID taskId = getNewTaskID();
     scheduleTaskAttempt(taskId);
@@ -469,7 +469,7 @@ public class TestTaskImpl {
   }
 
 
-  @Test
+  @Test(timeout = 5000)
   public void testChangeCommitTaskAttempt() {
     TezTaskID taskId = getNewTaskID();
     scheduleTaskAttempt(taskId);
@@ -507,7 +507,7 @@ public class TestTaskImpl {
   }
   
   @SuppressWarnings("rawtypes")
-  @Test
+  @Test(timeout = 5000)
   public void testTaskSucceedAndRetroActiveFailure() {
     TezTaskID taskId = getNewTaskID();
     scheduleTaskAttempt(taskId);
@@ -535,7 +535,7 @@ public class TestTaskImpl {
     Assert.assertEquals(VertexEventType.V_TASK_RESCHEDULED, event.getType());
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testDiagnostics_TAUpdate(){
     TezTaskID taskId = getNewTaskID();
     scheduleTaskAttempt(taskId);
@@ -550,7 +550,7 @@ public class TestTaskImpl {
     assertEquals("TaskAttempt 1 failed, info=[diagnostics of test]", mockTask.getDiagnostics().get(1));
   }
   
-  @Test
+  @Test(timeout = 5000)
   public void testDiagnostics_KillNew(){
     TezTaskID taskId = getNewTaskID();
     mockTask.handle(new TaskEventTermination(taskId, TaskAttemptTerminationCause.TERMINATED_BY_CLIENT, null));
@@ -558,7 +558,7 @@ public class TestTaskImpl {
     assertTrue(mockTask.getDiagnostics().get(0).contains(TaskAttemptTerminationCause.TERMINATED_BY_CLIENT.name()));
   }
   
-  @Test
+  @Test(timeout = 5000)
   public void testDiagnostics_Kill(){
     TezTaskID taskId = getNewTaskID();
     scheduleTaskAttempt(taskId);

http://git-wip-us.apache.org/repos/asf/tez/blob/a23e740d/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestTaskRecovery.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestTaskRecovery.java b/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestTaskRecovery.java
index d953fef..f6e0162 100644
--- a/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestTaskRecovery.java
+++ b/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestTaskRecovery.java
@@ -223,7 +223,7 @@ public class TestTaskRecovery {
   /**
    * New -> RecoverTransition
    */
-  @Test
+  @Test(timeout = 5000)
   public void testRecovery_New() {
     task.handle(new TaskEventRecoverTask(task.getTaskId()));
     assertEquals(TaskStateInternal.NEW, task.getInternalState());
@@ -232,7 +232,7 @@ public class TestTaskRecovery {
   /**
    * -> restoreFromTaskFinishEvent ( no TaskStartEvent )
    */
-  @Test
+  @Test(timeout = 5000)
   public void testRecovery_NoStartEvent() {
     try {
       task.restoreFromEvent(new TaskFinishedEvent(task.getTaskId(), vertexName,
@@ -249,7 +249,7 @@ public class TestTaskRecovery {
   /**
    * restoreFromTaskStartedEvent -> RecoverTransition
    */
-  @Test
+  @Test(timeout = 5000)
   public void testRecovery_Started() {
     restoreFromTaskStartEvent();
 
@@ -266,7 +266,7 @@ public class TestTaskRecovery {
    * restoreFromTaskStartedEvent -> restoreFromTaskAttemptStartedEvent ->
    * RecoverTranstion
    */
-  @Test
+  @Test(timeout = 5000)
   public void testRecovery_OneTAStarted() {
     restoreFromTaskStartEvent();
     TezTaskAttemptID taId = getNewTaskAttemptID(task.getTaskId());
@@ -287,7 +287,7 @@ public class TestTaskRecovery {
    * restoreFromTaskStartedEvent -> restoreFromTaskAttemptStartedEvent ->
    * restoreFromTaskAttemptFinishedEvent (SUCCEEDED) -> RecoverTransition
    */
-  @Test
+  @Test(timeout = 5000)
   public void testRecovery_OneTAStarted_SUCCEEDED() {
     restoreFromTaskStartEvent();
     TezTaskAttemptID taId = getNewTaskAttemptID(task.getTaskId());
@@ -319,7 +319,7 @@ public class TestTaskRecovery {
    * restoreFromTaskStartedEvent -> restoreFromTaskAttemptStartedEvent ->
    * restoreFromTaskAttemptFinishedEvent (FAILED) -> RecoverTransition
    */
-  @Test
+  @Test(timeout = 5000)
   public void testRecovery_OneTAStarted_FAILED() {
     restoreFromTaskStartEvent();
     TezTaskAttemptID taId = getNewTaskAttemptID(task.getTaskId());
@@ -352,7 +352,7 @@ public class TestTaskRecovery {
    * restoreFromTaskStartedEvent -> restoreFromTaskAttemptStartedEvent ->
    * restoreFromTaskAttemptFinishedEvent (KILLED) -> RecoverTransition
    */
-  @Test
+  @Test(timeout = 5000)
   public void testRecovery_OneTAStarted_KILLED() {
     restoreFromTaskStartEvent();
     TezTaskAttemptID taId = getNewTaskAttemptID(task.getTaskId());
@@ -386,7 +386,7 @@ public class TestTaskRecovery {
    * restoreFromTaskAttemptFinishedEvent (SUCCEEDED) ->
    * restoreFromTaskFinishedEvent -> RecoverTransition
    */
-  @Test
+  @Test(timeout = 5000)
   public void testRecovery_OneTAStarted_SUCCEEDED_Finished() {
 
     restoreFromTaskStartEvent();
@@ -428,7 +428,7 @@ public class TestTaskRecovery {
    * restoreFromTaskAttemptFinishedEvent (Failed due to output_failure)
    * restoreFromTaskFinishedEvent -> RecoverTransition
    */
-  @Test
+  @Test(timeout = 5000)
   public void testRecovery_OneTAStarted_SUCCEEDED_FAILED() {
 
     restoreFromTaskStartEvent();
@@ -475,7 +475,7 @@ public class TestTaskRecovery {
    * restoreFromTaskAttemptFinishedEvent (KILLED due to node failed )
    * restoreFromTaskFinishedEvent -> RecoverTransition
    */
-  @Test
+  @Test(timeout = 5000)
   public void testRecovery_OneTAStarted_SUCCEEDED_KILLED() {
 
     restoreFromTaskStartEvent();
@@ -520,7 +520,7 @@ public class TestTaskRecovery {
    * restoreFromTaskStartedEvent -> restoreFromTaskAttemptStartedEvent ->
    * restoreFromTaskAttemptFinishedEvent (SUCCEEDED) -> RecoverTransition
    */
-  @Test
+  @Test(timeout = 5000)
   public void testRecovery_Commit_Failed_Recovery_Not_Supported() {
     Map<String, OutputCommitter> committers =
         new HashMap<String, OutputCommitter>();
@@ -560,7 +560,7 @@ public class TestTaskRecovery {
    * restoreFromTaskStartedEvent -> restoreFromTaskAttemptStartedEvent ->
    * restoreFromTaskAttemptFinishedEvent (SUCCEEDED) -> RecoverTransition
    */
-  @Test
+  @Test(timeout = 5000)
   public void testRecovery_Commit_Failed_recover_fail() {
     Map<String, OutputCommitter> committers =
         new HashMap<String, OutputCommitter>();
@@ -596,7 +596,7 @@ public class TestTaskRecovery {
     assertEquals(null, task.successfulAttempt);
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testRecovery_WithDesired_SUCCEEDED() {
     restoreFromTaskStartEvent();
     TezTaskAttemptID taId = getNewTaskAttemptID(task.getTaskId());
@@ -608,7 +608,7 @@ public class TestTaskRecovery {
     assertEquals(0, taEventHandler.getEvents().size());
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testRecovery_WithDesired_FAILED() {
     restoreFromTaskStartEvent();
     TezTaskAttemptID taId = getNewTaskAttemptID(task.getTaskId());
@@ -620,7 +620,7 @@ public class TestTaskRecovery {
     assertEquals(0, taEventHandler.getEvents().size());
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testRecovery_WithDesired_KILLED() {
     restoreFromTaskStartEvent();
     TezTaskAttemptID taId = getNewTaskAttemptID(task.getTaskId());
@@ -637,7 +637,7 @@ public class TestTaskRecovery {
    * restoreFromTaskStartedEvent -> restoreFromTaskAttemptStartedEvent ->
    * restoreFromTaskAttemptFinishedEvent (KILLED) -> RecoverTransition
    */
-  @Test
+  @Test(timeout = 5000)
   public void testRecovery_OneTAStarted_Killed() {
     restoreFromTaskStartEvent();
 
@@ -688,7 +688,7 @@ public class TestTaskRecovery {
    * killed. When recovering, it should continue to be in running state and
    * schedule a new task attempt.
    */
-  @Test
+  @Test(timeout = 5000)
   public void testTaskRecovery_MultipleAttempts1() {
     int maxFailedAttempts =
         conf.getInt(TezConfiguration.TEZ_AM_TASK_MAX_FAILED_ATTEMPTS,
@@ -718,7 +718,7 @@ public class TestTaskRecovery {
    * failed. When recovering, it should transit to failed because # of
    * failed_attempt is exceeded.
    */
-  @Test
+  @Test(timeout = 5000)
   public void testTaskRecovery_MultipleAttempts2() {
     int maxFailedAttempts =
         conf.getInt(TezConfiguration.TEZ_AM_TASK_MAX_FAILED_ATTEMPTS,
@@ -748,7 +748,7 @@ public class TestTaskRecovery {
    * the last attempt should transit to killed and task is still in running
    * state and new task attempt is scheduled.
    */
-  @Test
+  @Test(timeout = 5000)
   public void testTaskRecovery_MultipleAttempts3() throws InterruptedException {
     int maxFailedAttempts =
         conf.getInt(TezConfiguration.TEZ_AM_TASK_MAX_FAILED_ATTEMPTS,

http://git-wip-us.apache.org/repos/asf/tez/blob/a23e740d/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestVertexManager.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestVertexManager.java b/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestVertexManager.java
index 5da6ce8..73dc5eb 100644
--- a/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestVertexManager.java
+++ b/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestVertexManager.java
@@ -50,7 +50,7 @@ import com.google.common.collect.Sets;
 
 public class TestVertexManager {
 
-  @Test
+  @Test(timeout = 5000)
   public void testOnRootVertexInitialized() throws Exception {
     Vertex mockVertex = mock(Vertex.class, RETURNS_DEEP_STUBS);
     AppContext mockAppContext = mock(AppContext.class, RETURNS_DEEP_STUBS);
@@ -90,7 +90,7 @@ public class TestVertexManager {
    * custom vertex manager generates events only when both i1 and i2 are initialized.
    * @throws Exception
    */
-  @Test
+  @Test(timeout = 5000)
   public void testOnRootVertexInitialized2() throws Exception {
     Vertex mockVertex = mock(Vertex.class, RETURNS_DEEP_STUBS);
     AppContext mockAppContext = mock(AppContext.class, RETURNS_DEEP_STUBS);

http://git-wip-us.apache.org/repos/asf/tez/blob/a23e740d/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestVertexRecovery.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestVertexRecovery.java b/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestVertexRecovery.java
index 1b8ac2f..664382a 100644
--- a/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestVertexRecovery.java
+++ b/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestVertexRecovery.java
@@ -337,7 +337,7 @@ public class TestVertexRecovery {
   /**
    * vertex1(New) -> StartRecoveryTransition(SUCCEEDED)
    */
-  @Test
+  @Test(timeout = 5000)
   public void testRecovery_Desired_SUCCEEDED() {
     VertexImpl vertex1 = (VertexImpl) dag.getVertex("vertex1");
     VertexState recoveredState = vertex1.restoreFromEvent(new VertexInitializedEvent(vertex1.getVertexId(),
@@ -366,7 +366,7 @@ public class TestVertexRecovery {
    * vertex1(New) -> StartRecoveryTransition(SUCCEEDED)
    * @throws IOException 
    */
-  @Test
+  @Test(timeout = 5000)
   public void testRecovery_Desired_SUCCEEDED_OnlySummaryLog() throws IOException {
     DAGPlan dagPlan = createDAGPlanSingleVertex();
     dag =
@@ -403,7 +403,7 @@ public class TestVertexRecovery {
   /**
    * vertex1(New) -> StartRecoveryTransition(FAILED)
    */
-  @Test
+  @Test(timeout = 5000)
   public void testRecovery_Desired_FAILED() {
     VertexImpl vertex1 = (VertexImpl) dag.getVertex("vertex1");
     VertexState recoveredState = vertex1.restoreFromEvent(new VertexInitializedEvent(vertex1.getVertexId(),
@@ -430,7 +430,7 @@ public class TestVertexRecovery {
   /**
    * vertex1(New) -> StartRecoveryTransition(KILLED)
    */
-  @Test
+  @Test(timeout = 5000)
   public void testRecovery_Desired_KILLED() {
     VertexImpl vertex1 = (VertexImpl) dag.getVertex("vertex1");
     VertexState recoveredState = vertex1.restoreFromEvent(new VertexInitializedEvent(vertex1.getVertexId(),
@@ -457,7 +457,7 @@ public class TestVertexRecovery {
   /**
    * vertex1(New) -> StartRecoveryTransition(ERROR)
    */
-  @Test
+  @Test(timeout = 5000)
   public void testRecovery_Desired_ERROR() {
     VertexImpl vertex1 = (VertexImpl) dag.getVertex("vertex1");
     VertexState recoveredState = vertex1.restoreFromEvent(new VertexInitializedEvent(vertex1.getVertexId(),
@@ -490,7 +490,7 @@ public class TestVertexRecovery {
   /**
    * vertex1(New) -> restoreFromDataMovementEvent -> StartRecoveryTransition
    */
-  @Test
+  @Test(timeout = 5000)
   public void testRecovery_New_Desired_RUNNING() {
     VertexImpl vertex1 = (VertexImpl) dag.getVertex("vertex1");
     VertexState recoveredState =
@@ -563,7 +563,7 @@ public class TestVertexRecovery {
   /**
    * restoreFromVertexInitializedEvent -> StartRecoveryTransition
    */
-  @Test
+  @Test(timeout = 5000)
   public void testRecovery_Inited_Desired_RUNNING() {
     VertexImpl vertex1 = (VertexImpl) dag.getVertex("vertex1");
     restoreFromInitializedEvent(vertex1);
@@ -598,7 +598,7 @@ public class TestVertexRecovery {
    * restoreFromVertexInitializedEvent -> restoreFromVertexStartedEvent ->
    * StartRecoveryTransition
    */
-  @Test
+  @Test(timeout = 5000)
   public void testRecovery_Started_Desired_RUNNING() {
     VertexImpl vertex1 = (VertexImpl) dag.getVertex("vertex1");
     restoreFromInitializedEvent(vertex1);
@@ -643,7 +643,7 @@ public class TestVertexRecovery {
    * restoreFromVertexInitializedEvent -> restoreFromVertexStartedEvent ->
    * restoreFromVertexFinishedEvent -> StartRecoveryTransition
    */
-  @Test
+  @Test(timeout = 5000)
   public void testRecovery_Finished_Desired_RUNNING() {
     // v1: initFromInitializedEvent
     VertexImpl vertex1 = (VertexImpl) dag.getVertex("vertex1");
@@ -694,7 +694,7 @@ public class TestVertexRecovery {
    * vertex1 (New) -> StartRecoveryTransition <br>
    * vertex2 (New) -> StartRecoveryTransition vertex3 (New) -> RecoverTransition
    */
-  @Test
+  @Test(timeout = 5000)
   public void testRecovery_RecoveringFromNew() {
     VertexImpl vertex1 = (VertexImpl) dag.getVertex("vertex1");
     vertex1.handle(new VertexEventRecoverVertex(vertex1.getVertexId(),
@@ -742,7 +742,7 @@ public class TestVertexRecovery {
   }
   
   
-  @Test
+  @Test(timeout = 5000)
   public void testRecovery_VertexManagerErrorOnRecovery() {
     VertexImpl vertex1 = (VertexImpl) dag.getVertex("vertex1");
     restoreFromInitializedEvent(vertex1);
@@ -788,7 +788,7 @@ public class TestVertexRecovery {
    * vertex2 (New) -> restoreFromInitialized -> StartRecoveryTransition<br>
    * vertex3 (New) -> restoreFromVertexInitedEvent -> RecoverTransition<br>
    */
-  @Test
+  @Test(timeout = 5000)
   public void testRecovery_RecoveringFromInited() {
     VertexImpl vertex1 = (VertexImpl) dag.getVertex("vertex1");
     restoreFromInitializedEvent(vertex1);
@@ -849,7 +849,7 @@ public class TestVertexRecovery {
    * vertex2 (New) -> restoreFromInitialized -> restoreFromVertexStarted -> StartRecoveryTransition <br>
    * vertex3 (New) -> restoreFromInitialized -> restoreFromVertexStarted -> RecoverTransition
    */
-  @Test
+  @Test(timeout = 5000)
   public void testRecovery_RecoveringFromRunning() {
     VertexImpl vertex1 = (VertexImpl) dag.getVertex("vertex1");
     restoreFromInitializedEvent(vertex1);
@@ -923,7 +923,7 @@ public class TestVertexRecovery {
    * restoreFromVertexFinished -> StartRecoveryTransition<br>
    * vertex3 (New) -> restoreFromInitialized -> restoreFromVertexStarted -> RecoverTransition
    */
-  @Test
+  @Test(timeout = 5000)
   public void testRecovery_RecoveringFromSUCCEEDED() {
     VertexImpl vertex1 = (VertexImpl) dag.getVertex("vertex1");
     restoreFromInitializedEvent(vertex1);

http://git-wip-us.apache.org/repos/asf/tez/blob/a23e740d/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestVertexStats.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestVertexStats.java b/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestVertexStats.java
index 80fe861..eef877a 100644
--- a/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestVertexStats.java
+++ b/tez-dag/src/test/java/org/apache/tez/dag/app/dag/impl/TestVertexStats.java
@@ -27,7 +27,7 @@ import org.junit.Test;
 
 public class TestVertexStats {
 
-  @Test
+  @Test(timeout = 5000)
   public void testBasicStats() {
     VertexStats stats = new VertexStats();
     Assert.assertEquals(-1, stats.firstTaskStartTime);

http://git-wip-us.apache.org/repos/asf/tez/blob/a23e740d/tez-dag/src/test/java/org/apache/tez/dag/app/dag/speculation/legacy/TestDataStatistics.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/test/java/org/apache/tez/dag/app/dag/speculation/legacy/TestDataStatistics.java b/tez-dag/src/test/java/org/apache/tez/dag/app/dag/speculation/legacy/TestDataStatistics.java
index fe09594..f4791a9 100644
--- a/tez-dag/src/test/java/org/apache/tez/dag/app/dag/speculation/legacy/TestDataStatistics.java
+++ b/tez-dag/src/test/java/org/apache/tez/dag/app/dag/speculation/legacy/TestDataStatistics.java
@@ -25,7 +25,7 @@ public class TestDataStatistics {
 
   private static final double TOL = 0.001;
 
-  @Test
+  @Test(timeout = 5000)
   public void testEmptyDataStatistics() throws Exception {
     DataStatistics statistics = new DataStatistics();
     Assert.assertEquals(0, statistics.count(), TOL);
@@ -35,7 +35,7 @@ public class TestDataStatistics {
     Assert.assertEquals(Long.MAX_VALUE, statistics.outlier(1.0f), TOL);
   }
   
-  @Test
+  @Test(timeout = 5000)
   public void testSingleEntryDataStatistics() throws Exception {
     DataStatistics statistics = new DataStatistics(17.29);
     Assert.assertEquals(1, statistics.count(), TOL);
@@ -45,7 +45,7 @@ public class TestDataStatistics {
     Assert.assertEquals(17.29, statistics.outlier(1.0f), TOL);
   }
   
-  @Test
+  @Test(timeout = 5000)
   public void testMutiEntryDataStatistics() throws Exception {
     DataStatistics statistics = new DataStatistics();
     statistics.add(17);
@@ -57,7 +57,7 @@ public class TestDataStatistics {
     Assert.assertEquals(29.0, statistics.outlier(1.0f), TOL);
  }
   
-  @Test
+  @Test(timeout = 5000)
   public void testUpdateStatistics() throws Exception {
     DataStatistics statistics = new DataStatistics(17);
     statistics.add(29);

http://git-wip-us.apache.org/repos/asf/tez/blob/a23e740d/tez-dag/src/test/java/org/apache/tez/dag/app/rm/TestLocalTaskScheduler.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/test/java/org/apache/tez/dag/app/rm/TestLocalTaskScheduler.java b/tez-dag/src/test/java/org/apache/tez/dag/app/rm/TestLocalTaskScheduler.java
index c6e83c0..60782e6 100644
--- a/tez-dag/src/test/java/org/apache/tez/dag/app/rm/TestLocalTaskScheduler.java
+++ b/tez-dag/src/test/java/org/apache/tez/dag/app/rm/TestLocalTaskScheduler.java
@@ -52,7 +52,7 @@ public class TestLocalTaskScheduler {
     return appContext;
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void maxTasksAllocationsCannotBeExceeded() {
 
     final int MAX_TASKS = 4;

http://git-wip-us.apache.org/repos/asf/tez/blob/a23e740d/tez-dag/src/test/java/org/apache/tez/dag/app/rm/TestTaskScheduler.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/test/java/org/apache/tez/dag/app/rm/TestTaskScheduler.java b/tez-dag/src/test/java/org/apache/tez/dag/app/rm/TestTaskScheduler.java
index 6899a6c..aaa8a5f 100644
--- a/tez-dag/src/test/java/org/apache/tez/dag/app/rm/TestTaskScheduler.java
+++ b/tez-dag/src/test/java/org/apache/tez/dag/app/rm/TestTaskScheduler.java
@@ -1496,7 +1496,7 @@ public class TestTaskScheduler {
   }
 
   @SuppressWarnings("unchecked")
-  @Test
+  @Test(timeout = 5000)
   public void testLocalityMatching() throws Exception {
 
     RackResolver.init(new Configuration());

http://git-wip-us.apache.org/repos/asf/tez/blob/a23e740d/tez-dag/src/test/java/org/apache/tez/dag/history/events/TestHistoryEventsProtoConversion.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/test/java/org/apache/tez/dag/history/events/TestHistoryEventsProtoConversion.java b/tez-dag/src/test/java/org/apache/tez/dag/history/events/TestHistoryEventsProtoConversion.java
index 3b6c3ef..fb1f6f9 100644
--- a/tez-dag/src/test/java/org/apache/tez/dag/history/events/TestHistoryEventsProtoConversion.java
+++ b/tez-dag/src/test/java/org/apache/tez/dag/history/events/TestHistoryEventsProtoConversion.java
@@ -634,7 +634,7 @@ public class TestHistoryEventsProtoConversion {
   }
 
 
-  @Test
+  @Test(timeout = 5000)
   public void testDefaultProtoConversion() throws Exception {
     for (HistoryEventType eventType : HistoryEventType.values()) {
       switch (eventType) {

http://git-wip-us.apache.org/repos/asf/tez/blob/a23e740d/tez-dag/src/test/java/org/apache/tez/dag/history/logging/impl/TestHistoryEventJsonConversion.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/test/java/org/apache/tez/dag/history/logging/impl/TestHistoryEventJsonConversion.java b/tez-dag/src/test/java/org/apache/tez/dag/history/logging/impl/TestHistoryEventJsonConversion.java
index db8add7..a31cfca 100644
--- a/tez-dag/src/test/java/org/apache/tez/dag/history/logging/impl/TestHistoryEventJsonConversion.java
+++ b/tez-dag/src/test/java/org/apache/tez/dag/history/logging/impl/TestHistoryEventJsonConversion.java
@@ -98,7 +98,7 @@ public class TestHistoryEventJsonConversion {
     nodeId = NodeId.newInstance("node", 13435);
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testHandlerExists() throws JSONException {
     for (HistoryEventType eventType : HistoryEventType.values()) {
       HistoryEvent event = null;
@@ -190,7 +190,7 @@ public class TestHistoryEventJsonConversion {
     }
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testConvertVertexParallelismUpdatedEvent() throws JSONException {
     TezVertexID vId = TezVertexID.getInstance(
         TezDAGID.getInstance(

http://git-wip-us.apache.org/repos/asf/tez/blob/a23e740d/tez-dag/src/test/java/org/apache/tez/dag/history/utils/TestDAGUtils.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/test/java/org/apache/tez/dag/history/utils/TestDAGUtils.java b/tez-dag/src/test/java/org/apache/tez/dag/history/utils/TestDAGUtils.java
index 496a12c..cb7e0c8 100644
--- a/tez-dag/src/test/java/org/apache/tez/dag/history/utils/TestDAGUtils.java
+++ b/tez-dag/src/test/java/org/apache/tez/dag/history/utils/TestDAGUtils.java
@@ -95,7 +95,7 @@ public class TestDAGUtils {
     return dag.createDag(conf, null, null, null, true);
   }
 
-  @Test
+  @Test(timeout = 5000)
   @SuppressWarnings("unchecked")
   public void testConvertDAGPlanToATSMap() throws IOException, JSONException {
     DAGPlan dagPlan = createDAG();

http://git-wip-us.apache.org/repos/asf/tez/blob/a23e740d/tez-dag/src/test/java/org/apache/tez/dag/utils/TestSimple2LevelVersionComparator.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/test/java/org/apache/tez/dag/utils/TestSimple2LevelVersionComparator.java b/tez-dag/src/test/java/org/apache/tez/dag/utils/TestSimple2LevelVersionComparator.java
index 1152313..f383c37 100644
--- a/tez-dag/src/test/java/org/apache/tez/dag/utils/TestSimple2LevelVersionComparator.java
+++ b/tez-dag/src/test/java/org/apache/tez/dag/utils/TestSimple2LevelVersionComparator.java
@@ -25,7 +25,7 @@ public class TestSimple2LevelVersionComparator {
 
   private final Simple2LevelVersionComparator comparator = new Simple2LevelVersionComparator();
 
-  @Test
+  @Test(timeout = 5000)
   public void testBasicEqualChecks() {
     Assert.assertEquals(0, comparator.compare("1-SNAPSHOT", "1-SNAPSHOT"));
     Assert.assertEquals(0, comparator.compare("1.1-SNAPSHOT", "1.1-SNAPSHOT"));
@@ -39,7 +39,7 @@ public class TestSimple2LevelVersionComparator {
     Assert.assertEquals(0, comparator.compare("1-SNAP.x", "1-SNAP.x"));
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testInvalidVersions() {
     Assert.assertEquals(-1, comparator.compare("x.1", "x.1"));
     Assert.assertEquals(-1, comparator.compare("x.1", "0.1"));
@@ -51,7 +51,7 @@ public class TestSimple2LevelVersionComparator {
     Assert.assertEquals(-1, comparator.compare("Unknown", "Unknown"));
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testInequalityChecks() {
     Assert.assertEquals(-1, comparator.compare("1.1", "2.1"));
     Assert.assertEquals(1, comparator.compare("1.1", "0.1"));

http://git-wip-us.apache.org/repos/asf/tez/blob/a23e740d/tez-dag/src/test/java/org/apache/tez/runtime/task/TestTaskExecution.java
----------------------------------------------------------------------
diff --git a/tez-dag/src/test/java/org/apache/tez/runtime/task/TestTaskExecution.java b/tez-dag/src/test/java/org/apache/tez/runtime/task/TestTaskExecution.java
index bd13543..57c3251 100644
--- a/tez-dag/src/test/java/org/apache/tez/runtime/task/TestTaskExecution.java
+++ b/tez-dag/src/test/java/org/apache/tez/runtime/task/TestTaskExecution.java
@@ -114,7 +114,7 @@ public class TestTaskExecution {
     taskExecutor.shutdownNow();
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testSingleSuccessfulTask() throws IOException, InterruptedException, TezException,
       ExecutionException {
     ListeningExecutorService executor = null;
@@ -140,7 +140,7 @@ public class TestTaskExecution {
     }
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testMultipleSuccessfulTasks() throws IOException, InterruptedException, TezException,
       ExecutionException {
 
@@ -180,7 +180,7 @@ public class TestTaskExecution {
   }
 
   // test tasked failed due to exception in Processor
-  @Test
+  @Test(timeout = 5000)
   public void testFailedTask() throws IOException, InterruptedException, TezException {
 
     ListeningExecutorService executor = null;
@@ -215,7 +215,7 @@ public class TestTaskExecution {
   }
 
   // Test task failed due to Processor class not found
-  @Test
+  @Test(timeout = 5000)
   public void testFailedTask2() throws IOException, InterruptedException, TezException {
 
     ListeningExecutorService executor = null;
@@ -245,7 +245,7 @@ public class TestTaskExecution {
     }
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testHeartbeatException() throws IOException, InterruptedException, TezException {
 
     ListeningExecutorService executor = null;
@@ -283,7 +283,7 @@ public class TestTaskExecution {
     }
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testHeartbeatShouldDie() throws IOException, InterruptedException, TezException,
       ExecutionException {
 
@@ -320,7 +320,7 @@ public class TestTaskExecution {
     }
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testGetTaskShouldDie() throws InterruptedException, ExecutionException {
     ListeningExecutorService executor = null;
     try {

http://git-wip-us.apache.org/repos/asf/tez/blob/a23e740d/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/common/TestMRInputSplitDistributor.java
----------------------------------------------------------------------
diff --git a/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/common/TestMRInputSplitDistributor.java b/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/common/TestMRInputSplitDistributor.java
index 7f31741..cdf1ee4 100644
--- a/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/common/TestMRInputSplitDistributor.java
+++ b/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/common/TestMRInputSplitDistributor.java
@@ -56,7 +56,7 @@ import com.google.protobuf.ByteString;
 
 public class TestMRInputSplitDistributor {
 
-  @Test
+  @Test(timeout = 5000)
   public void testSerializedPayload() throws IOException {
 
     Configuration conf = new Configuration(false);
@@ -105,7 +105,7 @@ public class TestMRInputSplitDistributor {
     assertEquals(2, ((InputSplitForTest) is2).identifier);
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testDeserializedPayload() throws IOException {
 
     Configuration conf = new Configuration(false);

http://git-wip-us.apache.org/repos/asf/tez/blob/a23e740d/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/hadoop/TestConfigTranslationMRToTez.java
----------------------------------------------------------------------
diff --git a/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/hadoop/TestConfigTranslationMRToTez.java b/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/hadoop/TestConfigTranslationMRToTez.java
index 4874eb9..deab64f 100644
--- a/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/hadoop/TestConfigTranslationMRToTez.java
+++ b/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/hadoop/TestConfigTranslationMRToTez.java
@@ -29,7 +29,7 @@ import org.junit.Test;
 
 public class TestConfigTranslationMRToTez {
 
-  @Test
+  @Test(timeout = 5000)
   // Tests derived keys - i.e. the actual key is not set, but the value is 
   // derived from a fallback key.
   public void testComplexKeys() {
@@ -49,7 +49,7 @@ public class TestConfigTranslationMRToTez {
         .getIntermediateInputKeyComparator(confVertex1).getClass().getName());
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testMRToTezKeyTranslation() {
     JobConf confVertex1 = new JobConf();
     confVertex1.set(MRJobConfig.MAP_OUTPUT_KEY_CLASS,

http://git-wip-us.apache.org/repos/asf/tez/blob/a23e740d/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/hadoop/TestDeprecatedKeys.java
----------------------------------------------------------------------
diff --git a/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/hadoop/TestDeprecatedKeys.java b/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/hadoop/TestDeprecatedKeys.java
index 9aa36d9..3727233 100644
--- a/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/hadoop/TestDeprecatedKeys.java
+++ b/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/hadoop/TestDeprecatedKeys.java
@@ -29,7 +29,7 @@ import org.junit.Test;
 
 public class TestDeprecatedKeys {
 
-  @Test
+  @Test(timeout = 5000)
   public void verifyReduceKeyTranslation() {
     JobConf jobConf = new JobConf();
 
@@ -64,7 +64,7 @@ public class TestDeprecatedKeys {
         0.01f);
   }
 
-  @Test
+  @Test(timeout = 5000)
   /**
    * Set of keys that can be overriden at tez runtime
    */

http://git-wip-us.apache.org/repos/asf/tez/blob/a23e740d/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/hadoop/TestMRHelpers.java
----------------------------------------------------------------------
diff --git a/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/hadoop/TestMRHelpers.java b/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/hadoop/TestMRHelpers.java
index 27f1863..b7d22b1 100644
--- a/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/hadoop/TestMRHelpers.java
+++ b/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/hadoop/TestMRHelpers.java
@@ -45,7 +45,7 @@ public class TestMRHelpers {
     return conf;
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testMapJavaOptions() {
     Configuration conf = createConfForJavaOptsTest();
     String opts = MRHelpers.getJavaOptsForMRMapper(conf);
@@ -62,7 +62,7 @@ public class TestMRHelpers {
         + TezConstants.TEZ_ROOT_LOGGER_NAME + "=TRACE"));
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testReduceJavaOptions() {
     Configuration conf = createConfForJavaOptsTest();
     String opts = MRHelpers.getJavaOptsForMRReducer(conf);
@@ -79,7 +79,7 @@ public class TestMRHelpers {
         + TezConstants.TEZ_ROOT_LOGGER_NAME + "=TRACE"));
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testContainerResourceConstruction() {
     JobConf conf = new JobConf(new Configuration());
     Resource mapResource = MRHelpers.getResourceForMRMapper(conf);
@@ -148,7 +148,7 @@ public class TestMRHelpers {
 //        env.get(Environment.CLASSPATH.name()).indexOf(Environment.PWD.$()));
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testMREnvSetupForMap() {
     Configuration conf = setupConfigForMREnvTest();
     Map<String, String> env = new HashMap<String, String>();
@@ -158,7 +158,7 @@ public class TestMRHelpers {
     Assert.assertEquals("map2", env.get("bar"));
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testMREnvSetupForReduce() {
     Configuration conf = setupConfigForMREnvTest();
     Map<String, String> env = new HashMap<String, String>();
@@ -168,7 +168,7 @@ public class TestMRHelpers {
     Assert.assertEquals("red2", env.get("bar"));
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testMRAMJavaOpts() {
     Configuration conf = new Configuration();
     conf.set(MRJobConfig.MR_AM_ADMIN_COMMAND_OPTS, " -Dadminfoobar   ");
@@ -177,7 +177,7 @@ public class TestMRHelpers {
     Assert.assertEquals("-Dadminfoobar -Duserfoo", opts);
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testMRAMEnvironmentSetup() {
     Configuration conf = new Configuration();
     conf.set(MRJobConfig.MR_AM_ADMIN_USER_ENV, "foo=bar,admin1=foo1");

http://git-wip-us.apache.org/repos/asf/tez/blob/a23e740d/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/hadoop/TestMRInputHelpers.java
----------------------------------------------------------------------
diff --git a/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/hadoop/TestMRInputHelpers.java b/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/hadoop/TestMRInputHelpers.java
index e2bd1bb..58ad053 100644
--- a/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/hadoop/TestMRInputHelpers.java
+++ b/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/hadoop/TestMRInputHelpers.java
@@ -99,7 +99,7 @@ public class TestMRInputHelpers {
   }
 
 
-  @Test
+  @Test(timeout = 5000)
   public void testNewSplitsGen() throws Exception {
 
     DataSourceDescriptor dataSource = generateDataSourceDescriptorMapReduce(newSplitsDir);
@@ -137,7 +137,7 @@ public class TestMRInputHelpers {
     verifyLocationHints(newSplitsDir, dataSource.getLocationHint().getTaskLocationHints());
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testOldSplitsGen() throws Exception {
     DataSourceDescriptor dataSource = generateDataSourceDescriptorMapRed(oldSplitsDir);
     Assert.assertTrue(
@@ -173,7 +173,7 @@ public class TestMRInputHelpers {
     verifyLocationHints(oldSplitsDir, dataSource.getLocationHint().getTaskLocationHints());
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testInputSplitLocalResourceCreation() throws Exception {
     DataSourceDescriptor dataSource = generateDataSourceDescriptorMapRed(oldSplitsDir);
 

http://git-wip-us.apache.org/repos/asf/tez/blob/a23e740d/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/processor/map/TestMapProcessor.java
----------------------------------------------------------------------
diff --git a/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/processor/map/TestMapProcessor.java b/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/processor/map/TestMapProcessor.java
index caa2663..6e45054 100644
--- a/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/processor/map/TestMapProcessor.java
+++ b/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/processor/map/TestMapProcessor.java
@@ -103,7 +103,7 @@ public class TestMapProcessor {
     localFs.delete(workDir, true);
   }
   
-  @Test
+  @Test(timeout = 5000)
   public void testMapProcessor() throws Exception {
     String dagName = "mrdag0";
     String vertexName = MultiStageMRConfigUtil.getInitialMapVertexName();

http://git-wip-us.apache.org/repos/asf/tez/blob/a23e740d/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/processor/reduce/TestReduceProcessor.java
----------------------------------------------------------------------
diff --git a/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/processor/reduce/TestReduceProcessor.java b/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/processor/reduce/TestReduceProcessor.java
index 9fed710..3b33afd 100644
--- a/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/processor/reduce/TestReduceProcessor.java
+++ b/tez-mapreduce/src/test/java/org/apache/tez/mapreduce/processor/reduce/TestReduceProcessor.java
@@ -113,7 +113,7 @@ public class TestReduceProcessor {
     localFs.delete(workDir, true);
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testReduceProcessor() throws Exception {
     final String dagName = "mrdag0";
     String mapVertexName = MultiStageMRConfigUtil.getInitialMapVertexName();

http://git-wip-us.apache.org/repos/asf/tez/blob/a23e740d/tez-plugins/tez-yarn-timeline-history/src/test/java/org/apache/tez/dag/history/logging/ats/TestHistoryEventTimelineConversion.java
----------------------------------------------------------------------
diff --git a/tez-plugins/tez-yarn-timeline-history/src/test/java/org/apache/tez/dag/history/logging/ats/TestHistoryEventTimelineConversion.java b/tez-plugins/tez-yarn-timeline-history/src/test/java/org/apache/tez/dag/history/logging/ats/TestHistoryEventTimelineConversion.java
index 3ba2f86..e1eb3a4 100644
--- a/tez-plugins/tez-yarn-timeline-history/src/test/java/org/apache/tez/dag/history/logging/ats/TestHistoryEventTimelineConversion.java
+++ b/tez-plugins/tez-yarn-timeline-history/src/test/java/org/apache/tez/dag/history/logging/ats/TestHistoryEventTimelineConversion.java
@@ -100,7 +100,7 @@ public class TestHistoryEventTimelineConversion {
     nodeId = NodeId.newInstance("node", 13435);
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testHandlerExists() throws JSONException {
     for (HistoryEventType eventType : HistoryEventType.values()) {
       HistoryEvent event = null;
@@ -192,7 +192,7 @@ public class TestHistoryEventTimelineConversion {
     }
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testConvertAppLaunchedEvent() {
     long launchTime = random.nextLong();
     long submitTime = random.nextLong();
@@ -229,7 +229,7 @@ public class TestHistoryEventTimelineConversion {
     Assert.assertEquals(conf.get("applicationId"), config.get("applicationId"));
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testConvertContainerLaunchedEvent() {
     long launchTime = random.nextLong();
     ContainerLaunchedEvent event = new ContainerLaunchedEvent(containerId, launchTime,
@@ -259,7 +259,7 @@ public class TestHistoryEventTimelineConversion {
         timelineEntity.getEvents().get(0).getTimestamp());
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testConvertDAGSubmittedEvent() {
     long submitTime = random.nextLong();
 
@@ -310,7 +310,7 @@ public class TestHistoryEventTimelineConversion {
 
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testConvertDAGInitializedEvent() {
     long initTime = random.nextLong();
 
@@ -347,7 +347,7 @@ public class TestHistoryEventTimelineConversion {
 
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testConvertDAGFinishedEvent() {
     long finishTime = random.nextLong();
     long startTime = random.nextLong();
@@ -396,7 +396,7 @@ public class TestHistoryEventTimelineConversion {
         ((Integer)timelineEntity.getOtherInfo().get("BAR")).intValue());
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testConvertVertexInitializedEvent() {
     long initRequestedTime = random.nextLong();
     long initedTime = random.nextLong();
@@ -441,7 +441,7 @@ public class TestHistoryEventTimelineConversion {
         ((Integer)timelineEntity.getOtherInfo().get(ATSConstants.NUM_TASKS)).intValue());
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testConvertVertexFinishedEvent() {
     long initRequestedTime = random.nextLong();
     long initedTime = random.nextLong();
@@ -493,7 +493,7 @@ public class TestHistoryEventTimelineConversion {
         ((Integer)timelineEntity.getOtherInfo().get("BAR")).intValue());
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testConvertTaskStartedEvent() {
     long scheduleTime = random.nextLong();
     long startTime = random.nextLong();
@@ -535,7 +535,7 @@ public class TestHistoryEventTimelineConversion {
         ((Long)timelineEntity.getOtherInfo().get(ATSConstants.START_TIME)).longValue());
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testConvertTaskAttemptStartedEvent() {
     long startTime = random.nextLong();
     TaskAttemptStartedEvent event = new TaskAttemptStartedEvent(tezTaskAttemptID, "v1",
@@ -589,7 +589,7 @@ public class TestHistoryEventTimelineConversion {
         timelineEntity.getOtherInfo().get(ATSConstants.NODE_HTTP_ADDRESS));
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testConvertVertexParallelismUpdatedEvent() {
     TezVertexID vId = tezVertexID;
     Map<String, EdgeManagerPluginDescriptor> edgeMgrs =

http://git-wip-us.apache.org/repos/asf/tez/blob/a23e740d/tez-runtime-internals/src/test/java/org/apache/tez/runtime/TestLogicalIOProcessorRuntimeTask.java
----------------------------------------------------------------------
diff --git a/tez-runtime-internals/src/test/java/org/apache/tez/runtime/TestLogicalIOProcessorRuntimeTask.java b/tez-runtime-internals/src/test/java/org/apache/tez/runtime/TestLogicalIOProcessorRuntimeTask.java
index bbd252d..9f1a0c0 100644
--- a/tez-runtime-internals/src/test/java/org/apache/tez/runtime/TestLogicalIOProcessorRuntimeTask.java
+++ b/tez-runtime-internals/src/test/java/org/apache/tez/runtime/TestLogicalIOProcessorRuntimeTask.java
@@ -58,7 +58,7 @@ import com.google.common.collect.Multimap;
 
 public class TestLogicalIOProcessorRuntimeTask {
 
-  @Test
+  @Test(timeout = 5000)
   public void testAutoStart() throws Exception {
     TezDAGID dagId = createTezDagId();
     TezVertexID vertexId = createTezVertexId(dagId);

http://git-wip-us.apache.org/repos/asf/tez/blob/a23e740d/tez-runtime-internals/src/test/java/org/apache/tez/runtime/common/objectregistry/TestObjectRegistry.java
----------------------------------------------------------------------
diff --git a/tez-runtime-internals/src/test/java/org/apache/tez/runtime/common/objectregistry/TestObjectRegistry.java b/tez-runtime-internals/src/test/java/org/apache/tez/runtime/common/objectregistry/TestObjectRegistry.java
index ad229ce..e4f041a 100644
--- a/tez-runtime-internals/src/test/java/org/apache/tez/runtime/common/objectregistry/TestObjectRegistry.java
+++ b/tez-runtime-internals/src/test/java/org/apache/tez/runtime/common/objectregistry/TestObjectRegistry.java
@@ -43,13 +43,13 @@ public class TestObjectRegistry {
 
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testBasicCRUD() {
     ObjectRegistry objectRegistry = new ObjectRegistryImpl();
     testCRUD(objectRegistry);
   }
 
-  @Test
+  @Test(timeout = 5000)
   public void testClearCache() {
     ObjectRegistry objectRegistry = new ObjectRegistryImpl();
     testCRUD(objectRegistry);

http://git-wip-us.apache.org/repos/asf/tez/blob/a23e740d/tez-runtime-library/src/test/java/org/apache/tez/runtime/library/api/TestTezRuntimeConfiguration.java
----------------------------------------------------------------------
diff --git a/tez-runtime-library/src/test/java/org/apache/tez/runtime/library/api/TestTezRuntimeConfiguration.java b/tez-runtime-library/src/test/java/org/apache/tez/runtime/library/api/TestTezRuntimeConfiguration.java
index 4c0f6b9..fcaebd9 100644
--- a/tez-runtime-library/src/test/java/org/apache/tez/runtime/library/api/TestTezRuntimeConfiguration.java
+++ b/tez-runtime-library/src/test/java/org/apache/tez/runtime/library/api/TestTezRuntimeConfiguration.java
@@ -33,7 +33,7 @@ import org.junit.Test;
 public class TestTezRuntimeConfiguration {
 
 
-  @Test
+  @Test(timeout = 5000)
   public void testKeySet() throws IllegalAccessException {
     Class<?> c = TezRuntimeConfiguration.class;
     Set<String> expectedKeys = new HashSet<String>();


Mime
View raw message