HDFS-13268. TestWebHdfsFileContextMainOperations fails on Windows. Contributed by Xiao Liang.

(cherry picked from commit fe224ff972)
This commit is contained in:
Inigo Goiri 2018-03-20 11:19:46 -07:00
parent 4aa34324b2
commit d6df90f7b5
1 changed files with 2 additions and 2 deletions

View File

@ -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;