smengcl commented on a change in pull request #2843:
URL: https://github.com/apache/ozone/pull/2843#discussion_r750851467
##########
File path:
hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestRootedOzoneFileSystem.java
##########
@@ -730,12 +750,25 @@ public void testListStatusRootAndVolumeNonRecursive()
throws Exception {
// listStatus("/")
Path root = new Path(OZONE_URI_DELIMITER);
FileStatus[] fileStatusRoot = ofs.listStatus(root);
- // Default volume "s3v" is created by OM during start up.
- Assert.assertEquals(2 + 1, fileStatusRoot.length);
- for (FileStatus fileStatus : fileStatusRoot) {
- Assert.assertEquals(ownerShort, fileStatus.getOwner());
- Assert.assertEquals(group, fileStatus.getGroup());
+
+ if (!enableAcl) {
+ // When ACL is disabled, ofs.listStatus(root) will see 2+1 = 3 volumes,
+ // the +1 is the default volume "s3v" created by OM during start up.
+ Assert.assertEquals(2 + 1, fileStatusRoot.length);
+ for (FileStatus fileStatus : fileStatusRoot) {
+ Assert.assertEquals(ownerShort, fileStatus.getOwner());
+ Assert.assertEquals(group, fileStatus.getGroup());
+ }
}
+ // When ACL is enabled, this test will see a 4th volume created by
Review comment:
Only this last part of test check is failing when ACL is enabled, the
rest of the test is passing.
I think I would add back "assert 4 volumes exists" when ACL is enabled, but
ignore the owner or group check here.
Ideally each tests should be self-contained (i.e. do necessary volume
create, and clean up at the end), instead of doing `createVolumeAndBucket` in
init, but unfortunately when others were adding new test cases this is ideality
broken. And it wasn't discovered at the time because of the improper
parameterized initialization. 🤦
--
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]