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/02/09 20:51:24 UTC

[GitHub] [ozone] ayushtkn commented on pull request #1884: HDDS-4784. TestRootedOzoneFileSystem is not picking the configured 'Parameters'

ayushtkn commented on pull request #1884:
URL: https://github.com/apache/ozone/pull/1884#issuecomment-776235766


   Thanx @rakeshadr for taking this up.
   I think only two `testDeleteCreatesFakeParentDir` and `testMkdirOnNonExistentVolumeBucketDir` are broken, the other two are failing because, these two failed test didn't clean up properly.
   
   Doesn't look like a bug, should be a test only issue. Changing to `fs.exists(key)` from getting key and validating fixes all of them(for me). Give a check if that does for you too.
   Something like this, Just for reference:
   ```
   diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestRootedOzoneFileSystem.java b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestRootedOzoneFileSystem.java
   index 98e535496..777760675 100644
   --- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestRootedOzoneFileSystem.java
   +++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestRootedOzoneFileSystem.java
   @@ -247,12 +247,8 @@ public void testDeleteCreatesFakeParentDir() throws Exception {
        // Delete the child key
        Assert.assertTrue(fs.delete(child, false));
    
   -    // Deleting the only child should create the parent dir key if it does
   -    // not exist
   -    OFSPath parentOFSPath = new OFSPath(parent);
   -    String parentKey = parentOFSPath.getKeyName() + "/";
   -    OzoneKeyDetails parentKeyInfo = getKey(parent, true);
   -    Assert.assertEquals(parentKey, parentKeyInfo.getName());
   +    // Deleting the only child should not delete the parent
   +    Assert.assertNotNull(fs.exists(parent));
    
        // Recursive delete with DeleteIterator
        Assert.assertTrue(fs.delete(grandparent, true));
   @@ -339,11 +335,7 @@ public void testMkdirOnNonExistentVolumeBucketDir() throws Exception {
    
        // Check volume and bucket existence, they should both be created.
        OzoneVolume ozoneVolume = objectStore.getVolume(volumeNameLocal);
   -    OzoneBucket ozoneBucket = ozoneVolume.getBucket(bucketNameLocal);
   -    OFSPath ofsPathDir1 = new OFSPath(dir12);
   -    String key = ofsPathDir1.getKeyName() + "/";
   -    OzoneKeyDetails ozoneKeyDetails = ozoneBucket.getKey(key);
   -    Assert.assertEquals(key, ozoneKeyDetails.getName());
   +    Assert.assertTrue(fs.exists(dir12));
    
        // Verify that directories are created.
        FileStatus[] fileStatuses = ofs.listStatus(root);
   
   ```
   HDDS-4102, seems to have introduced this with `enabledFileSystemPaths` it `normalizes` the key path. 


----------------------------------------------------------------
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.

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