[
https://issues.apache.org/jira/browse/HADOOP-2431?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12558867#action_12558867
]
Tsz Wo (Nicholas), SZE commented on HADOOP-2431:
------------------------------------------------
The tests are very systemic. Below are some comments for
testPermissionSetting() and testOwnership().
- Suggestion: add LOG.info("NUM_TEST_PERMISSIONS=" + NUM_TEST_PERMISSIONS) to
show the value.
- DEFAULT_PERMISSION may not be a constant although it is final:
FsPermission.applyUMask(...) is called during file/dir creation.
If it is a constant, it is better to use FsPermission.createImmutable(short).
In this case, it happens working fine for 777.
- re-throw RuntimeException in static{...}
- testPermissionSetting: case 4,5 not in the same order as they in the pdf file.
- testOwnership(OpType op): <user1, group3> but GROUP1_NAME in the code
- NON_EXISTENT_PATH: It is better to check the existence of the path before
using it.
- setOwner(...): add assertFalse(expectDeny) right before catch(...)
> Test HDFS File Permissions
> --------------------------
>
> Key: HADOOP-2431
> URL: https://issues.apache.org/jira/browse/HADOOP-2431
> Project: Hadoop
> Issue Type: Test
> Components: test
> Affects Versions: 0.15.1
> Reporter: Hairong Kuang
> Assignee: Hairong Kuang
> Fix For: 0.16.0
>
> Attachments: HDFSPermissionSpecification6.pdf,
> PermissionsTestPlan1.pdf, testDFSPermission.patch, testDFSPermission1.patch
>
>
> This jira is intended to provide junit tests to HADOOP-1298.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.