umamaheswararao commented on a change in pull request #2132:
URL: https://github.com/apache/hadoop/pull/2132#discussion_r453274329



##########
File path: 
hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/viewfs/TestViewFsOverloadSchemeListStatus.java
##########
@@ -124,6 +126,24 @@ public void testListStatusACL() throws IOException, 
URISyntaxException {
     }
   }
 
+  /**
+   * Tests that ViewFSOverloadScheme should consider initialized fs as fallback
+   * if there are no mount links configured.
+   */
+  @Test(timeout = 30000)
+  public void testViewFSOverloadSchemeWithoutAnyMountLinks() throws Exception {
+    try (FileSystem fs = FileSystem.get(TEST_DIR.toPath().toUri(), conf)) {
+      ViewFileSystemOverloadScheme vfs = (ViewFileSystemOverloadScheme) fs;
+      Assert.assertEquals(0, vfs.getMountPoints().length);
+      Path testFallBack = new Path("test", FILE_NAME);
+      Assert.assertTrue(vfs.mkdirs(testFallBack));
+      FileStatus[] status = vfs.listStatus(testFallBack.getParent());
+      Assert.assertEquals(FILE_NAME, status[0].getPath().getName());
+      Assert.assertEquals(testFallBack.getName(),

Review comment:
       Done




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to