You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2021/11/16 10:08:35 UTC

[GitHub] [ozone] smengcl opened a new pull request #2843: HDDS-5969. TestRootedOzoneFileSystem parameterized test is not initialized properly

smengcl opened a new pull request #2843:
URL: https://github.com/apache/ozone/pull/2843


   https://issues.apache.org/jira/browse/HDDS-5969
   
   To initialize the TestRootedOzoneFileSystem parameters properly.


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] smengcl commented on a change in pull request #2843: HDDS-5969. TestRootedOzoneFileSystem parameterized test is not initialized properly

Posted by GitBox <gi...@apache.org>.
smengcl commented on a change in pull request #2843:
URL: https://github.com/apache/ozone/pull/2843#discussion_r750853314



##########
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:
       Done




-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] smengcl commented on a change in pull request #2843: HDDS-5969. TestRootedOzoneFileSystem parameterized test is not initialized properly

Posted by GitBox <gi...@apache.org>.
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] smengcl merged pull request #2843: HDDS-5969. TestRootedOzoneFileSystem parameterized test is not initialized properly

Posted by GitBox <gi...@apache.org>.
smengcl merged pull request #2843:
URL: https://github.com/apache/ozone/pull/2843


   


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] fapifta commented on a change in pull request #2843: HDDS-5969. TestRootedOzoneFileSystem parameterized test is not initialized properly

Posted by GitBox <gi...@apache.org>.
fapifta commented on a change in pull request #2843:
URL: https://github.com/apache/ozone/pull/2843#discussion_r750783990



##########
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:
       Should we add an assertion on this case? Or assume disabled acls for this test?




-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


[GitHub] [ozone] smengcl commented on pull request #2843: HDDS-5969. TestRootedOzoneFileSystem parameterized test is not initialized properly

Posted by GitBox <gi...@apache.org>.
smengcl commented on pull request #2843:
URL: https://github.com/apache/ozone/pull/2843#issuecomment-972270341


   Thanks @fapifta for the review, comment and +1. Will merge shortly.


-- 
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: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org