ayushtkn commented on code in PR #6288:
URL: https://github.com/apache/hadoop/pull/6288#discussion_r1411615808
##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/test/java/org/apache/hadoop/hdfs/server/federation/router/TestRouterMountTable.java:
##########
@@ -666,6 +673,25 @@ public void testGetListingWithTrailingSlash() throws
IOException {
}
}
+ @Test
+ public void testGetFileInfoWithMountPoint() throws IOException {
+ try {
+ // Add mount table entry
+ MountTable addEntry = MountTable.newInstance("/testgetfileinfo/ns1/dir",
+ Collections.singletonMap("ns1", "/testgetfileinfo/ns1/dir"));
+ assertTrue(addMountTable(addEntry));
+ nnFs1.mkdirs(new Path("/testgetfileinfo/ns1/dir"));
+
+ FileStatus fileStatus = routerFs.getFileStatus(new
Path("/testgetfileinfo/ns1"));
+
assertTrue(fileStatus.getPath().toString().endsWith("/testgetfileinfo/ns1"));
Review Comment:
can we assert the complete path rather than just endsWith? here & below
--
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]