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:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]