JyotinderSingh commented on a change in pull request #3109:
URL: https://github.com/apache/ozone/pull/3109#discussion_r810510553
##########
File path:
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestRootedOzoneFileSystem.java
##########
@@ -897,9 +891,23 @@ public void testListStatusRootAndVolumeContinuation()
throws IOException {
// numEntries > 5
FileStatus[] fileStatusesOver = customListStatus(new Path("/"),
false, "", 8);
- // There are only 5 volumes
+
+ // There are only 5 volumes created by current user.
// Default volume "s3v" is created during startup.
- Assert.assertEquals(5 + 1, fileStatusesOver.length);
+ //
+ // When ACL is enabled, listStatus root will see a 7th volume created by
+ // userXXXXX as the result of createVolumeAndBucket in initClusterAndEnv.
+ // This is due to the difference in behavior in listVolumesByUser depending
+ // on whether ACL is enabled or not:
+ // 1. when ACL is disabled, listVolumesByUser would only return volumes
+ // OWNED by the current user (volume owner is the current user);
+ // 2. when ACL is enabled, it would return all the volumes that the
current
+ // user has LIST permission to, regardless of the volume owner field.
+ if (enableAcl) {
+ Assert.assertEquals(5 + 1 + 1, fileStatusesOver.length);
+ } else {
+ Assert.assertEquals(5 + 1, fileStatusesOver.length);
+ }
Review comment:
@rakeshadr
This is a behavior change in the test, could you review this?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]