From 4147a5214349896dc40112e22c9e10aa8e5b5ea6 Mon Sep 17 00:00:00 2001 From: Tsz-wo Sze Date: Fri, 4 Apr 2014 15:50:46 +0000 Subject: [PATCH] HDFS-6189. Multiple HDFS tests fail on Windows attempting to use a test root path containing a colon. Contributed by cnauroth git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1584763 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt | 3 +++ .../test/java/org/apache/hadoop/fs/TestFcHdfsCreateMkdir.java | 2 +- .../test/java/org/apache/hadoop/fs/TestFcHdfsPermission.java | 2 +- .../src/test/java/org/apache/hadoop/fs/TestFcHdfsSetUMask.java | 2 +- .../apache/hadoop/fs/TestHDFSFileContextMainOperations.java | 2 +- .../test/java/org/apache/hadoop/fs/TestSymlinkHdfsDisable.java | 3 ++- .../apache/hadoop/fs/viewfs/TestViewFileSystemAtHdfsRoot.java | 2 +- .../org/apache/hadoop/fs/viewfs/TestViewFileSystemHdfs.java | 2 +- .../java/org/apache/hadoop/fs/viewfs/TestViewFsAtHdfsRoot.java | 2 +- .../test/java/org/apache/hadoop/fs/viewfs/TestViewFsHdfs.java | 2 +- .../apache/hadoop/hdfs/web/TestFSMainOperationsWebHdfs.java | 2 +- 11 files changed, 14 insertions(+), 10 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt index 1455bf430d5..f309dfcf9d1 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt +++ b/hadoop-hdfs-project/hadoop-hdfs/CHANGES.txt @@ -319,6 +319,9 @@ Release 2.4.1 - UNRELEASED BUG FIXES + HDFS-6189. Multiple HDFS tests fail on Windows attempting to use a test + root path containing a colon. (cnauroth via szetszwo) + Release 2.4.0 - 2014-04-07 INCOMPATIBLE CHANGES diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestFcHdfsCreateMkdir.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestFcHdfsCreateMkdir.java index 6ef7d6be1c1..40dbc4e88c9 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestFcHdfsCreateMkdir.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestFcHdfsCreateMkdir.java @@ -40,7 +40,7 @@ public class TestFcHdfsCreateMkdir extends @Override protected FileContextTestHelper createFileContextHelper() { - return new FileContextTestHelper(); + return new FileContextTestHelper("/tmp/TestFcHdfsCreateMkdir"); } diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestFcHdfsPermission.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestFcHdfsPermission.java index 1a90b0c6cf2..9f0b23cedfe 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestFcHdfsPermission.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestFcHdfsPermission.java @@ -35,7 +35,7 @@ import org.junit.BeforeClass; public class TestFcHdfsPermission extends FileContextPermissionBase { private static final FileContextTestHelper fileContextTestHelper = - new FileContextTestHelper(); + new FileContextTestHelper("/tmp/TestFcHdfsPermission"); private static FileContext fc; private static MiniDFSCluster cluster; diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestFcHdfsSetUMask.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestFcHdfsSetUMask.java index 5b758d37707..404c538ef1a 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestFcHdfsSetUMask.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestFcHdfsSetUMask.java @@ -43,7 +43,7 @@ import org.junit.Test; public class TestFcHdfsSetUMask { private static final FileContextTestHelper fileContextTestHelper = - new FileContextTestHelper(); + new FileContextTestHelper("/tmp/TestFcHdfsSetUMask"); private static MiniDFSCluster cluster; private static Path defaultWorkingDirectory; private static FileContext fc; diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestHDFSFileContextMainOperations.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestHDFSFileContextMainOperations.java index f87da6b8d76..8a215b0cee8 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestHDFSFileContextMainOperations.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestHDFSFileContextMainOperations.java @@ -49,7 +49,7 @@ public class TestHDFSFileContextMainOperations extends @Override protected FileContextTestHelper createFileContextHelper() { - return new FileContextTestHelper(); + return new FileContextTestHelper("/tmp/TestHDFSFileContextMainOperations"); } @BeforeClass diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestSymlinkHdfsDisable.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestSymlinkHdfsDisable.java index 2ba89116072..e5a513394a9 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestSymlinkHdfsDisable.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/TestSymlinkHdfsDisable.java @@ -42,7 +42,8 @@ public class TestSymlinkHdfsDisable { DistributedFileSystem dfs = cluster.getFileSystem(); FileContext fc = FileContext.getFileContext(cluster.getURI(0), conf); // Create test files/links - FileContextTestHelper helper = new FileContextTestHelper(); + FileContextTestHelper helper = new FileContextTestHelper( + "/tmp/TestSymlinkHdfsDisable"); Path root = helper.getTestRootPath(fc); Path target = new Path(root, "target"); Path link = new Path(root, "link"); diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFileSystemAtHdfsRoot.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFileSystemAtHdfsRoot.java index b6c8e699ffc..9b2953c61cd 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFileSystemAtHdfsRoot.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFileSystemAtHdfsRoot.java @@ -45,7 +45,7 @@ public class TestViewFileSystemAtHdfsRoot extends ViewFileSystemBaseTest { @Override protected FileSystemTestHelper createFileSystemHelper() { - return new FileSystemTestHelper(); + return new FileSystemTestHelper("/tmp/TestViewFileSystemAtHdfsRoot"); } @BeforeClass diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFileSystemHdfs.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFileSystemHdfs.java index eb3ee333224..24dd7a34d25 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFileSystemHdfs.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFileSystemHdfs.java @@ -52,7 +52,7 @@ public class TestViewFileSystemHdfs extends ViewFileSystemBaseTest { @Override protected FileSystemTestHelper createFileSystemHelper() { - return new FileSystemTestHelper(); + return new FileSystemTestHelper("/tmp/TestViewFileSystemHdfs"); } @BeforeClass diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFsAtHdfsRoot.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFsAtHdfsRoot.java index 504e192df3a..9fb3a5b5cc7 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFsAtHdfsRoot.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFsAtHdfsRoot.java @@ -46,7 +46,7 @@ public class TestViewFsAtHdfsRoot extends ViewFsBaseTest { @Override protected FileContextTestHelper createFileContextHelper() { - return new FileContextTestHelper(); + return new FileContextTestHelper("/tmp/TestViewFsAtHdfsRoot"); } @BeforeClass diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFsHdfs.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFsHdfs.java index e7d94fc5b3b..96a395cfa34 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFsHdfs.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFsHdfs.java @@ -42,7 +42,7 @@ public class TestViewFsHdfs extends ViewFsBaseTest { @Override protected FileContextTestHelper createFileContextHelper() { - return new FileContextTestHelper(); + return new FileContextTestHelper("/tmp/TestViewFsHdfs"); } diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestFSMainOperationsWebHdfs.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestFSMainOperationsWebHdfs.java index 7c18627acf7..ad2352b3e00 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestFSMainOperationsWebHdfs.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestFSMainOperationsWebHdfs.java @@ -52,7 +52,7 @@ public class TestFSMainOperationsWebHdfs extends FSMainOperationsBaseTest { private static FileSystem fileSystem; public TestFSMainOperationsWebHdfs() { - super(); + super("/tmp/TestFSMainOperationsWebHdfs"); } @Override