From 91d7c74e6aa4850922f68bab490b585443e4fccb Mon Sep 17 00:00:00 2001 From: Inigo Goiri Date: Mon, 28 May 2018 10:26:47 -0700 Subject: [PATCH] HDFS-13627. TestErasureCodingExerciseAPIs fails on Windows. Contributed by Anbang Hu. --- .../apache/hadoop/hdfs/TestErasureCodingExerciseAPIs.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestErasureCodingExerciseAPIs.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestErasureCodingExerciseAPIs.java index 4335527d65e..c63ba347f73 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestErasureCodingExerciseAPIs.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestErasureCodingExerciseAPIs.java @@ -40,6 +40,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import java.io.DataOutputStream; +import java.io.File; import java.io.IOException; import java.nio.file.Paths; import java.security.NoSuchAlgorithmException; @@ -91,8 +92,10 @@ public class TestErasureCodingExerciseAPIs { // Set up java key store String testRootDir = Paths.get(new FileSystemTestHelper().getTestRootDir()) .toString(); + Path targetFile = new Path(new File(testRootDir).getAbsolutePath(), + "test.jks"); String keyProviderURI = JavaKeyStoreProvider.SCHEME_NAME + "://file" - + new Path(testRootDir, "test.jks").toUri(); + + targetFile.toUri(); conf.set(CommonConfigurationKeysPublic.HADOOP_SECURITY_KEY_PROVIDER_PATH, keyProviderURI); conf.setBoolean(DFSConfigKeys.DFS_NAMENODE_DELEGATION_TOKEN_ALWAYS_USE_KEY,