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/ffa09b44 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/ffa09b44 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/ffa09b44 Branch: refs/heads/branch-2.9 Commit: ffa09b44b50e10ab406c76ea15d12c320271d8a6 Parents: 73be429 Author: Inigo Goiri <[email protected]> Authored: Tue Mar 20 11:19:46 2018 -0700 Committer: Inigo Goiri <[email protected]> Committed: Tue Mar 20 11:22:03 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/ffa09b44/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 5bf842c..5c01092 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]
