diff --git a/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/test/TestHdfsHelper.java b/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/test/TestHdfsHelper.java index 62f197246f5..40650a5d68f 100644 --- a/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/test/TestHdfsHelper.java +++ b/hadoop-hdfs-project/hadoop-hdfs-httpfs/src/test/java/org/apache/hadoop/test/TestHdfsHelper.java @@ -163,8 +163,10 @@ public class TestHdfsHelper extends TestDirHelper { conf.setBoolean(DFSConfigKeys.DFS_NAMENODE_ACLS_ENABLED_KEY, true); conf.setBoolean(DFSConfigKeys.DFS_NAMENODE_XATTRS_ENABLED_KEY, true); FileSystemTestHelper helper = new FileSystemTestHelper(); + Path targetFile = new Path(new File(helper.getTestRootDir()) + .getAbsolutePath(), "test.jks"); final String jceksPath = JavaKeyStoreProvider.SCHEME_NAME + "://file" + - new Path(helper.getTestRootDir(), "test.jks").toUri(); + targetFile.toUri(); conf.set(CommonConfigurationKeysPublic.HADOOP_SECURITY_KEY_PROVIDER_PATH, jceksPath); MiniDFSCluster.Builder builder = new MiniDFSCluster.Builder(conf);