[ 
https://issues.apache.org/jira/browse/HADOOP-15710?focusedWorklogId=543400&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-543400
 ]

ASF GitHub Bot logged work on HADOOP-15710:
-------------------------------------------

                Author: ASF GitHub Bot
            Created on: 28/Jan/21 06:29
            Start Date: 28/Jan/21 06:29
    Worklog Time Spent: 10m 
      Work Description: mehakmeet commented on a change in pull request #2648:
URL: https://github.com/apache/hadoop/pull/2648#discussion_r565828388



##########
File path: 
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAbfsRestOperationException.java
##########
@@ -114,4 +118,19 @@ public void testWithDifferentCustomTokenFetchRetry(int 
numOfRetries) throws Exce
             + ") done, does not match with 
fs.azure.custom.token.fetch.retry.count configured (" + numOfRetries
             + ")", RetryTestTokenProvider.reTryCount == numOfRetries);
   }
-}
\ No newline at end of file
+
+  @Test
+  public void testPermissionDenied() throws Throwable {
+    final AzureBlobFileSystem fs = getFileSystem();
+    assumeTrue(fs.getIsNamespaceEnabled());
+    Path dir = new Path("testPermissionDenied");
+    Path path = new Path(dir, "file");
+    ContractTestUtils.writeTextFile(fs, path, "some text", true);
+    // no permissions
+    fs.setPermission(path, new FsPermission((short) 00000));
+    fs.setPermission(dir, new FsPermission((short) 00000));
+    intercept(AccessDeniedException.class, () ->
+        fs.delete(path, false));
+    intercept(AccessDeniedException.class, () ->
+        ContractTestUtils.readUTF8(fs, path, -1));
+  }}

Review comment:
       Add a new line at the end of the file.

##########
File path: 
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAbfsRestOperationException.java
##########
@@ -114,4 +118,19 @@ public void testWithDifferentCustomTokenFetchRetry(int 
numOfRetries) throws Exce
             + ") done, does not match with 
fs.azure.custom.token.fetch.retry.count configured (" + numOfRetries
             + ")", RetryTestTokenProvider.reTryCount == numOfRetries);
   }
-}
\ No newline at end of file
+
+  @Test

Review comment:
       JavaDocs or describe() for a better understanding of the test.




----------------------------------------------------------------
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:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 543400)
    Time Spent: 50m  (was: 40m)

> ABFS checkException to map 403 to AccessDeniedException
> -------------------------------------------------------
>
>                 Key: HADOOP-15710
>                 URL: https://issues.apache.org/jira/browse/HADOOP-15710
>             Project: Hadoop Common
>          Issue Type: Sub-task
>          Components: fs/azure
>    Affects Versions: HADOOP-15407
>            Reporter: Steve Loughran
>            Assignee: Bilahari T H
>            Priority: Blocker
>              Labels: abfsactive, pull-request-available
>          Time Spent: 50m
>  Remaining Estimate: 0h
>
> when you can't auth to ABFS, you get a 403 exception back. This should be 
> translated into an access denied exception for better clarity/handling



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

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

Reply via email to