You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ozone.apache.org by ra...@apache.org on 2021/02/02 12:23:22 UTC
[ozone] branch master updated: HDDS-4752. TestOzoneFileSystem is
not picking the configured 'Parameters' (#1846)
This is an automated email from the ASF dual-hosted git repository.
rakeshr 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 669a3ac HDDS-4752. TestOzoneFileSystem is not picking the configured 'Parameters' (#1846)
669a3ac is described below
commit 669a3ac451cb2615adc1287c23e2393b1d9758f9
Author: Rakesh Radhakrishnan <ra...@apache.org>
AuthorDate: Tue Feb 2 17:53:02 2021 +0530
HDDS-4752. TestOzoneFileSystem is not picking the configured 'Parameters' (#1846)
---
.../hadoop/fs/ozone/TestOzoneFileSystem.java | 22 +++++++++++++++++-----
1 file changed, 17 insertions(+), 5 deletions(-)
diff --git a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestOzoneFileSystem.java b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestOzoneFileSystem.java
index c4e3c3a..cd4e4b2 100644
--- a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestOzoneFileSystem.java
+++ b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/fs/ozone/TestOzoneFileSystem.java
@@ -69,7 +69,6 @@ import org.apache.hadoop.test.LambdaTestUtils;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.Assert;
-import org.junit.BeforeClass;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.Timeout;
@@ -94,8 +93,22 @@ public class TestOzoneFileSystem {
}
public TestOzoneFileSystem(boolean setDefaultFs, boolean enableOMRatis) {
- this.enabledFileSystemPaths = setDefaultFs;
- this.omRatisEnabled = enableOMRatis;
+ // Checking whether 'defaultFS' and 'omRatis' flags represents next
+ // parameter index values. This is to ensure that initialize
+ // TestOzoneFileSystem#init() function will be invoked only at the
+ // beginning of every new set of Parameterized.Parameters.
+ if (enabledFileSystemPaths != setDefaultFs ||
+ omRatisEnabled != enableOMRatis) {
+ enabledFileSystemPaths = setDefaultFs;
+ omRatisEnabled = enableOMRatis;
+ try {
+ teardown();
+ init();
+ } catch (Exception e) {
+ LOG.info("Unexpected exception", e);
+ fail("Unexpected exception:" + e.getMessage());
+ }
+ }
}
/**
* Set a timeout for each test.
@@ -116,8 +129,7 @@ public class TestOzoneFileSystem {
private static String bucketName;
private static Trash trash;
- @BeforeClass
- public static void init() throws Exception {
+ private void init() throws Exception {
OzoneConfiguration conf = new OzoneConfiguration();
conf.setInt(FS_TRASH_INTERVAL_KEY, 1);
conf.setBoolean(OMConfigKeys.OZONE_OM_RATIS_ENABLE_KEY, omRatisEnabled);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@ozone.apache.org
For additional commands, e-mail: commits-help@ozone.apache.org