hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [hadoop] DadanielZ commented on a change in pull request #743: HADOOP-11452 make rename/3 public
Date Wed, 01 May 2019 04:49:16 GMT
DadanielZ commented on a change in pull request #743: HADOOP-11452 make rename/3 public
URL: https://github.com/apache/hadoop/pull/743#discussion_r280004735

 File path: hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/fs/FSMainOperationsBaseTest.java
 @@ -623,26 +625,25 @@ public void testGlobStatusFilterWithMultiplePathWildcardsAndNonTrivialFilter()
     FileStatus[] filteredPaths = fSys.globStatus(
         getTestRootPath(fSys, "test/hadoop/a??"),
-    Assert.assertEquals(2, filteredPaths.length);
-    Assert.assertTrue(containsTestRootPath(getTestRootPath(fSys, TEST_DIR_AXA),
+    assertEquals(2, filteredPaths.length);
+    assertTrue(containsTestRootPath(getTestRootPath(fSys, TEST_DIR_AXA),
-    Assert.assertTrue(containsTestRootPath(getTestRootPath(fSys, TEST_DIR_AXX),
+    assertTrue(containsTestRootPath(getTestRootPath(fSys, TEST_DIR_AXX),
   public void testGlobStatusThrowsExceptionForUnreadableDir()
       throws Exception {
+    assumePermissionsSupported();
     Path testRootDir = getTestRootPath(fSys, "test/hadoop/dir");
     Path obscuredDir = new Path(testRootDir, "foo");
     Path subDir = new Path(obscuredDir, "bar"); //so foo is non-empty
     fSys.setPermission(obscuredDir, new FsPermission((short)0)); //no access
     try {
-      fSys.globStatus(getTestRootPath(fSys, "test/hadoop/dir/foo/*"));
-      Assert.fail("Should throw IOException");
-    } catch (IOException ioe) {
-      // expected
+      intercept(IOException.class, () ->
 Review comment:
   This test does permission check for `getFileStatus` call.
   But according to [HdfsPermissionsGuide](https://hadoop.apache.org/docs/current/hadoop-project-dist/hadoop-hdfs/HdfsPermissionsGuide.html),
`getFileStatus/getFileInfo` call should not check the permission. I'm wondering do I miss
any documents?

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:

With regards,
Apache Git Services

To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org

View raw message