steveloughran commented on a change in pull request #1711: HADOOP-16455. ABFS:
Implement FileSystem.access() method.
URL: https://github.com/apache/hadoop/pull/1711#discussion_r347151667
##########
File path:
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAzureBlobFileSystemCheckAccess.java
##########
@@ -243,29 +250,41 @@ public void testFsActionALL() throws Exception {
isCheckAccessEnabled);
Path testFilePath = setupTestDirectoryAndUserAccess("/test8.txt",
FsAction.ALL);
- assertTrue(isAccessible(testFilePath, FsAction.EXECUTE));
- assertTrue(isAccessible(testFilePath, FsAction.WRITE));
- assertTrue(isAccessible(testFilePath, FsAction.WRITE_EXECUTE));
- assertTrue(isAccessible(testFilePath, FsAction.READ));
- assertTrue(isAccessible(testFilePath, FsAction.READ_EXECUTE));
- assertTrue(isAccessible(testFilePath, FsAction.READ_WRITE));
- assertTrue(isAccessible(testFilePath, FsAction.ALL));
+ assertAccessible(testFilePath, FsAction.EXECUTE);
+ assertAccessible(testFilePath, FsAction.WRITE);
+ assertAccessible(testFilePath, FsAction.WRITE_EXECUTE);
+ assertAccessible(testFilePath, FsAction.READ);
+ assertAccessible(testFilePath, FsAction.READ_EXECUTE);
+ assertAccessible(testFilePath, FsAction.READ_WRITE);
+ assertAccessible(testFilePath, FsAction.ALL);
+ }
+
+ private void assertAccessible(Path testFilePath, FsAction fsAction)
Review comment:
this is good -thanks for doing this. if you ever find yourself duplicating
code in tests, it's usually a sign to add your own assertions.
----------------------------------------------------------------
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]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]