[
https://issues.apache.org/jira/browse/HADOOP-19649?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18014567#comment-18014567
]
ASF GitHub Bot commented on HADOOP-19649:
-----------------------------------------
anujmodi2021 commented on code in PR #7868:
URL: https://github.com/apache/hadoop/pull/7868#discussion_r2282011563
##########
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAzureBlobFilesystemAcl.java:
##########
@@ -56,33 +56,55 @@
* Test acl operations.
*/
public class ITestAzureBlobFilesystemAcl extends AbstractAbfsIntegrationTest {
+
Review Comment:
So when the last time these changes were made the proper code-style was not
set by whoever made these changes.
In this PR these changes came in automatically due to importing the
recommended code-style.
Since this is the right thing to do, I feel like it might be okay to retain
these changes. Anyways this is a small PR.
##########
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/ITestAzureBlobFilesystemAcl.java:
##########
@@ -238,41 +276,46 @@ public void testModifyAclEntriesStickyBit() throws
Exception {
fs.modifyAclEntries(path, aclSpec);
AclStatus s = fs.getAclStatus(path);
AclEntry[] returned = s.getEntries().toArray(new AclEntry[0]);
- assertArrayEquals(new AclEntry[]{aclEntry(ACCESS, USER, FOO, READ_EXECUTE),
- aclEntry(ACCESS, GROUP, READ_EXECUTE), aclEntry(DEFAULT, USER, ALL),
- aclEntry(DEFAULT, USER, FOO, READ_EXECUTE), aclEntry(DEFAULT, GROUP,
READ_EXECUTE),
- aclEntry(DEFAULT, MASK, READ_EXECUTE), aclEntry(DEFAULT, OTHER, NONE)},
+ assertArrayEquals(new AclEntry[]{
+ aclEntry(ACCESS, USER, FOO, READ_EXECUTE),
+ aclEntry(ACCESS, GROUP, READ_EXECUTE),
+ aclEntry(DEFAULT, USER, ALL),
+ aclEntry(DEFAULT, USER, FOO, READ_EXECUTE),
+ aclEntry(DEFAULT, GROUP, READ_EXECUTE),
+ aclEntry(DEFAULT, MASK, READ_EXECUTE),
+ aclEntry(DEFAULT, OTHER, NONE)
+ },
returned);
assertPermission(fs, (short) 01750);
}
@Test
public void testModifyAclEntriesPathNotFound() throws Exception {
- Assertions.assertThrows(FileNotFoundException.class, () -> {
- final AzureBlobFileSystem fs = this.getFileSystem();
- assumeTrue(getIsNamespaceEnabled(fs));
- path = new Path(testRoot, UUID.randomUUID().toString());
- List<AclEntry> aclSpec = Lists.newArrayList(
- aclEntry(ACCESS, USER, ALL),
- aclEntry(ACCESS, USER, FOO, ALL),
- aclEntry(ACCESS, GROUP, READ_EXECUTE),
- aclEntry(ACCESS, OTHER, NONE));
- fs.modifyAclEntries(path, aclSpec);
- });
+ assumeTrue(getIsNamespaceEnabled(getFileSystem()));
+ Assertions.assertThrows(FileNotFoundException.class, () -> {
+ final AzureBlobFileSystem fs = this.getFileSystem();
+ path = new Path(testRoot, UUID.randomUUID().toString());
+ List<AclEntry> aclSpec = Lists.newArrayList(
+ aclEntry(ACCESS, USER, ALL),
+ aclEntry(ACCESS, USER, FOO, ALL),
+ aclEntry(ACCESS, GROUP, READ_EXECUTE),
+ aclEntry(ACCESS, OTHER, NONE));
+ fs.modifyAclEntries(path, aclSpec);
+ });
}
@Test
public void testModifyAclEntriesDefaultOnFile() throws Exception {
- Assertions.assertThrows(Exception.class, () -> {
- final AzureBlobFileSystem fs = this.getFileSystem();
- assumeTrue(getIsNamespaceEnabled(fs));
- path = new Path(testRoot, UUID.randomUUID().toString());
- fs.create(path).close();
- fs.setPermission(path, FsPermission.createImmutable((short) RW_R));
- List<AclEntry> aclSpec = Lists.newArrayList(
- aclEntry(DEFAULT, USER, FOO, ALL));
- fs.modifyAclEntries(path, aclSpec);
- });
+ Assertions.assertThrows(Exception.class, () -> {
+ final AzureBlobFileSystem fs = this.getFileSystem();
Review Comment:
Same as above
> ABFS: Fixing Test Failures and Wrong assumptions after Junit Upgrade
> --------------------------------------------------------------------
>
> Key: HADOOP-19649
> URL: https://issues.apache.org/jira/browse/HADOOP-19649
> Project: Hadoop Common
> Issue Type: Sub-task
> Components: fs/azure
> Affects Versions: 3.5.0, 3.4.2
> Reporter: Anuj Modi
> Assignee: Anuj Modi
> Priority: Major
> Labels: pull-request-available
>
> After https://issues.apache.org/jira/browse/HADOOP-19425
> most of the integration tests are getting skipped. All tests need to be fixed
> with this PRĀ
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]