You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tez.apache.org by bi...@apache.org on 2014/09/19 08:55:07 UTC

git commit: TEZ-1553. Multiple failures in testing path-related tests in TestTezCommonUtils for Windows (Prakash Ramachandran via bikas)

Repository: tez
Updated Branches:
  refs/heads/master 4cf6472e3 -> 4ab67799f


TEZ-1553. Multiple failures in testing path-related tests in TestTezCommonUtils for Windows (Prakash Ramachandran via bikas)


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

Branch: refs/heads/master
Commit: 4ab67799f3b7115ebf6117993861dc0cd9634b24
Parents: 4cf6472
Author: Bikas Saha <bi...@apache.org>
Authored: Thu Sep 18 23:54:49 2014 -0700
Committer: Bikas Saha <bi...@apache.org>
Committed: Thu Sep 18 23:54:49 2014 -0700

----------------------------------------------------------------------
 CHANGES.txt                                     |  2 +
 .../apache/tez/common/TestTezCommonUtils.java   | 54 ++++++++++----------
 2 files changed, 29 insertions(+), 27 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tez/blob/4ab67799/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index c0c03f5..be1cc5c 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -45,6 +45,8 @@ ALL CHANGES
   TEZ-1587. Some tez-examples fail in local mode.
   TEZ-1597. ImmediateStartVertexManager should handle corner case of vertex having zero tasks.
   TEZ-1495. ATS integration for TezClient
+  TEZ-1553. Multiple failures in testing path-related tests in
+  TestTezCommonUtils for Windows
 
 Release 0.5.0: 2014-09-03
 

http://git-wip-us.apache.org/repos/asf/tez/blob/4ab67799/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 e0975ab..45d73a3 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
@@ -93,10 +93,10 @@ public class TestTezCommonUtils {
   @Test
   public void testCreateTezSysStagingPath() throws Exception {
     String strAppId = "testAppId";
-    String expectedStageDir = RESOLVED_STAGE_DIR + File.separatorChar
-        + TezCommonUtils.TEZ_SYSTEM_SUB_DIR + File.separatorChar + strAppId;
-    String unResolvedStageDir = STAGE_DIR + File.separatorChar + TezCommonUtils.TEZ_SYSTEM_SUB_DIR
-        + File.separatorChar + strAppId;
+    String expectedStageDir = RESOLVED_STAGE_DIR + Path.SEPARATOR
+        + TezCommonUtils.TEZ_SYSTEM_SUB_DIR + Path.SEPARATOR + strAppId;
+    String unResolvedStageDir = STAGE_DIR + Path.SEPARATOR + TezCommonUtils.TEZ_SYSTEM_SUB_DIR
+        + Path.SEPARATOR + strAppId;
 
     Path stagePath = new Path(unResolvedStageDir);
     FileSystem fs = stagePath.getFileSystem(conf);
@@ -114,8 +114,8 @@ public class TestTezCommonUtils {
   public void testTezSysStagingPath() throws Exception {
     String strAppId = "testAppId";
     Path stageDir = TezCommonUtils.getTezSystemStagingPath(conf, strAppId);
-    String expectedStageDir = RESOLVED_STAGE_DIR + File.separatorChar
-        + TezCommonUtils.TEZ_SYSTEM_SUB_DIR + File.separatorChar + strAppId;
+    String expectedStageDir = RESOLVED_STAGE_DIR + Path.SEPARATOR
+        + TezCommonUtils.TEZ_SYSTEM_SUB_DIR + Path.SEPARATOR + strAppId;
     Assert.assertEquals(stageDir.toString(), expectedStageDir);
   }
 
@@ -125,8 +125,8 @@ public class TestTezCommonUtils {
     String strAppId = "testAppId";
     Path stageDir = TezCommonUtils.getTezSystemStagingPath(conf, strAppId);
     Path confStageDir = TezCommonUtils.getTezConfStagingPath(stageDir);
-    String expectedDir = RESOLVED_STAGE_DIR + File.separatorChar
-        + TezCommonUtils.TEZ_SYSTEM_SUB_DIR + File.separatorChar + strAppId + File.separator
+    String expectedDir = RESOLVED_STAGE_DIR + Path.SEPARATOR
+        + TezCommonUtils.TEZ_SYSTEM_SUB_DIR + Path.SEPARATOR + strAppId + Path.SEPARATOR
         + TezConstants.TEZ_PB_BINARY_CONF_NAME;
     Assert.assertEquals(confStageDir.toString(), expectedDir);
   }
@@ -137,8 +137,8 @@ public class TestTezCommonUtils {
     String strAppId = "testAppId";
     Path stageDir = TezCommonUtils.getTezSystemStagingPath(conf, strAppId);
     Path confStageDir = TezCommonUtils.getTezAMJarStagingPath(stageDir);
-    String expectedDir = RESOLVED_STAGE_DIR + File.separatorChar
-        + TezCommonUtils.TEZ_SYSTEM_SUB_DIR + File.separatorChar + strAppId + File.separator
+    String expectedDir = RESOLVED_STAGE_DIR + Path.SEPARATOR
+        + TezCommonUtils.TEZ_SYSTEM_SUB_DIR + Path.SEPARATOR + strAppId + Path.SEPARATOR
         + TezConstants.TEZ_AM_LOCAL_RESOURCES_PB_FILE_NAME;
     Assert.assertEquals(confStageDir.toString(), expectedDir);
   }
@@ -149,8 +149,8 @@ public class TestTezCommonUtils {
     String strAppId = "testAppId";
     Path stageDir = TezCommonUtils.getTezSystemStagingPath(conf, strAppId);
     Path confStageDir = TezCommonUtils.getTezBinPlanStagingPath(stageDir);
-    String expectedDir = RESOLVED_STAGE_DIR + File.separatorChar
-        + TezCommonUtils.TEZ_SYSTEM_SUB_DIR + File.separatorChar + strAppId + File.separator
+    String expectedDir = RESOLVED_STAGE_DIR + Path.SEPARATOR
+        + TezCommonUtils.TEZ_SYSTEM_SUB_DIR + Path.SEPARATOR + strAppId + Path.SEPARATOR
         + TezConstants.TEZ_PB_PLAN_BINARY_NAME;
     Assert.assertEquals(confStageDir.toString(), expectedDir);
   }
@@ -161,8 +161,8 @@ public class TestTezCommonUtils {
     String strAppId = "testAppId";
     Path stageDir = TezCommonUtils.getTezSystemStagingPath(conf, strAppId);
     Path confStageDir = TezCommonUtils.getTezTextPlanStagingPath(stageDir);
-    String expectedDir = RESOLVED_STAGE_DIR + File.separatorChar
-        + TezCommonUtils.TEZ_SYSTEM_SUB_DIR + File.separatorChar + strAppId + File.separator
+    String expectedDir = RESOLVED_STAGE_DIR + Path.SEPARATOR
+        + TezCommonUtils.TEZ_SYSTEM_SUB_DIR + Path.SEPARATOR + strAppId + Path.SEPARATOR
         + TezConstants.TEZ_PB_PLAN_TEXT_NAME;
     Assert.assertEquals(confStageDir.toString(), expectedDir);
   }
@@ -173,8 +173,8 @@ public class TestTezCommonUtils {
     String strAppId = "testAppId";
     Path stageDir = TezCommonUtils.getTezSystemStagingPath(conf, strAppId);
     Path confStageDir = TezCommonUtils.getRecoveryPath(stageDir, conf);
-    String expectedDir = RESOLVED_STAGE_DIR + File.separatorChar
-        + TezCommonUtils.TEZ_SYSTEM_SUB_DIR + File.separatorChar + strAppId + File.separator
+    String expectedDir = RESOLVED_STAGE_DIR + Path.SEPARATOR
+        + TezCommonUtils.TEZ_SYSTEM_SUB_DIR + Path.SEPARATOR + strAppId + Path.SEPARATOR
         + TezConstants.DAG_RECOVERY_DATA_DIR_NAME;
     Assert.assertEquals(confStageDir.toString(), expectedDir);
   }
@@ -187,9 +187,9 @@ public class TestTezCommonUtils {
     Path recoveryPath = TezCommonUtils.getRecoveryPath(stageDir, conf);
     Path recoveryStageDir = TezCommonUtils.getAttemptRecoveryPath(recoveryPath, 2);
 
-    String expectedDir = RESOLVED_STAGE_DIR + File.separatorChar
-        + TezCommonUtils.TEZ_SYSTEM_SUB_DIR + File.separatorChar + strAppId + File.separator
-        + TezConstants.DAG_RECOVERY_DATA_DIR_NAME + File.separator + "2";
+    String expectedDir = RESOLVED_STAGE_DIR + Path.SEPARATOR
+        + TezCommonUtils.TEZ_SYSTEM_SUB_DIR + Path.SEPARATOR + strAppId + Path.SEPARATOR
+        + TezConstants.DAG_RECOVERY_DATA_DIR_NAME + Path.SEPARATOR + "2";
     Assert.assertEquals(recoveryStageDir.toString(), expectedDir);
   }
 
@@ -203,11 +203,11 @@ public class TestTezCommonUtils {
 
     Path dagRecoveryPathj = TezCommonUtils.getDAGRecoveryPath(recoveryStageDir, "dag_123");
 
-    String expectedDir = RESOLVED_STAGE_DIR + File.separatorChar
-        + TezCommonUtils.TEZ_SYSTEM_SUB_DIR + File.separatorChar + strAppId + File.separator
-        + TezConstants.DAG_RECOVERY_DATA_DIR_NAME + File.separator + "2" + File.separator
+    String expectedDir = RESOLVED_STAGE_DIR + Path.SEPARATOR
+        + TezCommonUtils.TEZ_SYSTEM_SUB_DIR + Path.SEPARATOR + strAppId + Path.SEPARATOR
+        + TezConstants.DAG_RECOVERY_DATA_DIR_NAME + Path.SEPARATOR + "2" + Path.SEPARATOR
         + "dag_123" + TezConstants.DAG_RECOVERY_RECOVER_FILE_SUFFIX;
-    Assert.assertEquals(dagRecoveryPathj.toString(), expectedDir);
+    Assert.assertEquals(expectedDir, dagRecoveryPathj.toString());
   }
 
   // Testing Summary recovery path staging dir
@@ -219,11 +219,11 @@ public class TestTezCommonUtils {
     Path recoveryStageDir = TezCommonUtils.getAttemptRecoveryPath(recoveryPath, 2);
     Path summaryRecoveryPathj = TezCommonUtils.getSummaryRecoveryPath(recoveryStageDir);
 
-    String expectedDir = RESOLVED_STAGE_DIR + File.separatorChar
-        + TezCommonUtils.TEZ_SYSTEM_SUB_DIR + File.separatorChar + strAppId + File.separator
-        + TezConstants.DAG_RECOVERY_DATA_DIR_NAME + File.separator + "2" + File.separator
+    String expectedDir = RESOLVED_STAGE_DIR + Path.SEPARATOR
+        + TezCommonUtils.TEZ_SYSTEM_SUB_DIR + Path.SEPARATOR + strAppId + Path.SEPARATOR
+        + TezConstants.DAG_RECOVERY_DATA_DIR_NAME + Path.SEPARATOR + "2" + Path.SEPARATOR
         + TezConstants.DAG_RECOVERY_SUMMARY_FILE_SUFFIX;
-    Assert.assertEquals(summaryRecoveryPathj.toString(), expectedDir);
+    Assert.assertEquals(expectedDir, summaryRecoveryPathj.toString());
   }
 
   // This test is running here to leverage existing mini cluster