slfan1989 commented on code in PR #5517:
URL: https://github.com/apache/hadoop/pull/5517#discussion_r1152664763
##########
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/web/TestWebHDFS.java:
##########
@@ -2202,6 +2202,30 @@ public void testStatistics() throws Exception {
cluster.shutdown();
}
}
+
+ @Test
+ public void testLinkTarget() throws Exception {
+ final Configuration conf = WebHdfsTestUtil.createConf();
+
+ cluster = new MiniDFSCluster.Builder(conf)
+ .numDataNodes(3)
+ .build();
+ cluster.waitActive();
+
+ final WebHdfsFileSystem webHdfs =
WebHdfsTestUtil.getWebHdfsFileSystem(conf,
+ WebHdfsConstants.WEBHDFS_SCHEME);
+
+ // Symbolic link
+ Path root = new Path("/webHdfsTest/");
+ Path targetFile = new Path(root, "debug.log");
+ FileSystemTestHelper.createFile(webHdfs, targetFile);
+
+ Path symLink = new Path(root, "debug.link");
+
+ webHdfs.createSymlink(targetFile, symLink, false);
+ assertEquals(webHdfs.getLinkTarget(symLink), targetFile);
+ }
Review Comment:
cluster needs to be shut down.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]