You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ozone.apache.org by ad...@apache.org on 2022/04/20 10:38:34 UTC

[ozone] branch master updated: HDDS-6515. Intermittent failure in TestRootedOzoneFileSystem (#3322)

This is an automated email from the ASF dual-hosted git repository.

adoroszlai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git


The following commit(s) were added to refs/heads/master by this push:
     new 204584b395 HDDS-6515. Intermittent failure in TestRootedOzoneFileSystem (#3322)
204584b395 is described below

commit 204584b395c371065bea42ab9a01a9c2f3c6f1da
Author: Kaijie Chen <ch...@kaijie.org>
AuthorDate: Wed Apr 20 18:38:29 2022 +0800

    HDDS-6515. Intermittent failure in TestRootedOzoneFileSystem (#3322)
---
 .../hadoop/fs/ozone/TestRootedOzoneFileSystem.java | 26 +++++++++++++++-------
 1 file changed, 18 insertions(+), 8 deletions(-)

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 5c5c0e1544..cea9d0c4a4 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
@@ -56,8 +56,10 @@ import org.apache.hadoop.ozone.security.acl.OzoneAclConfig;
 import org.apache.hadoop.security.UserGroupInformation;
 import org.apache.ozone.test.GenericTestUtils;
 import org.apache.ozone.test.LambdaTestUtils;
+import org.junit.After;
 import org.junit.Assert;
 import org.junit.Assume;
+import org.junit.Before;
 import org.junit.Ignore;
 import org.junit.Rule;
 import org.junit.Test;
@@ -148,6 +150,22 @@ public class TestRootedOzoneFileSystem {
     IOUtils.closeQuietly(fs);
   }
 
+  @Before
+  public void createVolumeAndBucket() throws IOException {
+    // create a volume and a bucket to be used by RootedOzoneFileSystem (OFS)
+    OzoneBucket bucket =
+        TestDataUtil.createVolumeAndBucket(cluster, bucketLayout);
+    volumeName = bucket.getVolumeName();
+    volumePath = new Path(OZONE_URI_DELIMITER, volumeName);
+    bucketName = bucket.getName();
+    bucketPath = new Path(volumePath, bucketName);
+  }
+
+  @After
+  public void cleanup() throws IOException {
+    fs.delete(volumePath, true);
+  }
+
   public static FileSystem getFs() {
     return fs;
   }
@@ -219,14 +237,6 @@ public class TestRootedOzoneFileSystem {
     cluster.waitForClusterToBeReady();
     objectStore = cluster.getClient().getObjectStore();
 
-    // create a volume and a bucket to be used by RootedOzoneFileSystem (OFS)
-    OzoneBucket bucket =
-        TestDataUtil.createVolumeAndBucket(cluster, bucketLayout);
-    volumeName = bucket.getVolumeName();
-    volumePath = new Path(OZONE_URI_DELIMITER, volumeName);
-    bucketName = bucket.getName();
-    bucketPath = new Path(volumePath, bucketName);
-
     rootPath = String.format("%s://%s/",
         OzoneConsts.OZONE_OFS_URI_SCHEME, conf.get(OZONE_OM_ADDRESS_KEY));
 


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