HDFS-13268. TestWebHdfsFileContextMainOperations fails on Windows. Contributed by Xiao Liang.
(cherry picked from commit fe224ff972a299a74c16a6a20ddd85ea16486b1e) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/9b96e752 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/9b96e752 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/9b96e752 Branch: refs/heads/branch-3.1 Commit: 9b96e7522b7c1aa29e8dbaac4a738e9b938cb0c8 Parents: c804b28 Author: Inigo Goiri <[email protected]> Authored: Tue Mar 20 11:19:46 2018 -0700 Committer: Inigo Goiri <[email protected]> Committed: Tue Mar 20 11:20:37 2018 -0700 ---------------------------------------------------------------------- .../test/java/org/apache/hadoop/fs/FileContextTestHelper.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/hadoop/blob/9b96e752/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileContextTestHelper.java ---------------------------------------------------------------------- diff --git a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileContextTestHelper.java b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileContextTestHelper.java index e3a4a12..1f37f74 100644 --- a/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileContextTestHelper.java +++ b/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FileContextTestHelper.java @@ -43,7 +43,7 @@ public final class FileContextTestHelper { * Create a context with test root relative to the test directory */ public FileContextTestHelper() { - this(GenericTestUtils.getRandomizedTestDir().getAbsolutePath()); + this(GenericTestUtils.getRandomizedTestDir().getPath()); } /** @@ -83,7 +83,7 @@ public final class FileContextTestHelper { absTestRootDir = testRootDir; } else { absTestRootDir = fc.getWorkingDirectory().toString() + "/" - + testRootDir; + + new Path(testRootDir).toUri(); } } return absTestRootDir; --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
