hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From iwasak...@apache.org
Subject hadoop git commit: HADOOP-12589. Fix intermittent test failure of TestCopyPreserveFlag (iwasakims)
Date Sat, 13 Feb 2016 06:02:38 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2.8 b84640130 -> e0fccc9c9


HADOOP-12589. Fix intermittent test failure of TestCopyPreserveFlag (iwasakims)

(cherry picked from commit 36ba5cac37dee6b60e607401ac06d263e4ac5d8f)


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

Branch: refs/heads/branch-2.8
Commit: e0fccc9c94593cded23d8292d48527b86cb342bd
Parents: b846401
Author: Masatake Iwasaki <iwasakims@apache.org>
Authored: Sat Feb 13 14:59:38 2016 +0900
Committer: Masatake Iwasaki <iwasakims@apache.org>
Committed: Sat Feb 13 15:02:15 2016 +0900

----------------------------------------------------------------------
 hadoop-common-project/hadoop-common/CHANGES.txt                | 3 +++
 .../org/apache/hadoop/fs/contract/localfs/LocalFSContract.java | 6 +++---
 .../java/org/apache/hadoop/fs/shell/TestCopyPreserveFlag.java  | 5 ++---
 3 files changed, 8 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/e0fccc9c/hadoop-common-project/hadoop-common/CHANGES.txt
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt
index 8c1c5a4..e51be57 100644
--- a/hadoop-common-project/hadoop-common/CHANGES.txt
+++ b/hadoop-common-project/hadoop-common/CHANGES.txt
@@ -1880,6 +1880,9 @@ Release 2.6.5 - UNRELEASED
     HADOOP-12773. HBase classes fail to load with client/job classloader
     enabled (sjlee)
 
+    HADOOP-12589. Fix intermittent test failure of TestCopyPreserveFlag
+    (iwasakims)
+
 Release 2.6.4 - UNRELEASED
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e0fccc9c/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/contract/localfs/LocalFSContract.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/contract/localfs/LocalFSContract.java
b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/contract/localfs/LocalFSContract.java
index 8053335..74906fa 100644
--- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/contract/localfs/LocalFSContract.java
+++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/contract/localfs/LocalFSContract.java
@@ -20,6 +20,7 @@ package org.apache.hadoop.fs.contract.localfs;
 
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.fs.FileSystemTestHelper;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.fs.contract.AbstractFSContract;
 import org.apache.hadoop.fs.contract.ContractOptions;
@@ -39,9 +40,8 @@ import java.io.IOException;
 public class LocalFSContract extends AbstractFSContract {
 
   public static final String CONTRACT_XML = "contract/localfs.xml";
-  public static final String SYSPROP_TEST_BUILD_DATA = "test.build.data";
-  public static final String DEFAULT_TEST_BUILD_DATA_DIR = "test/build/data";
   private FileSystem fs;
+  private String testDataDir = new FileSystemTestHelper().getTestRootDir();
 
   public LocalFSContract(Configuration conf) {
     super(conf);
@@ -111,6 +111,6 @@ public class LocalFSContract extends AbstractFSContract {
    * @return the directory for test data
    */
   protected String getTestDataDir() {
-    return System.getProperty(SYSPROP_TEST_BUILD_DATA, DEFAULT_TEST_BUILD_DATA_DIR);
+    return testDataDir;
   }
 }

http://git-wip-us.apache.org/repos/asf/hadoop/blob/e0fccc9c/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/shell/TestCopyPreserveFlag.java
----------------------------------------------------------------------
diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/shell/TestCopyPreserveFlag.java
b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/shell/TestCopyPreserveFlag.java
index 263c697..85e3dda 100644
--- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/shell/TestCopyPreserveFlag.java
+++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/shell/TestCopyPreserveFlag.java
@@ -26,6 +26,7 @@ import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.fs.FSDataOutputStream;
 import org.apache.hadoop.fs.FileStatus;
 import org.apache.hadoop.fs.FileSystem;
+import org.apache.hadoop.fs.FileSystemTestHelper;
 import org.apache.hadoop.fs.LocalFileSystem;
 import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.fs.permission.FsAction;
@@ -59,9 +60,7 @@ public class TestCopyPreserveFlag {
     conf = new Configuration(false);
     conf.set("fs.file.impl", LocalFileSystem.class.getName());
     fs = FileSystem.getLocal(conf);
-    testDir = new Path(
-        System.getProperty("test.build.data", "build/test/data") + "/testStat"
-    );
+    testDir = new FileSystemTestHelper().getTestRootPath(fs);
     // don't want scheme on the path, just an absolute path
     testDir = new Path(fs.makeQualified(testDir).toUri().getPath());
 


Mime
View raw message