You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by zy...@apache.org on 2023/02/10 00:34:26 UTC
[iotdb] branch master updated: [IOTDB-5021] Adapting all schemaIT to add Schema_File mode (#9034)
This is an automated email from the ASF dual-hosted git repository.
zyk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new 5f8f2b9f88 [IOTDB-5021] Adapting all schemaIT to add Schema_File mode (#9034)
5f8f2b9f88 is described below
commit 5f8f2b9f88c2679d34bae0b248a7cd50d587d0ae
Author: Chen YZ <43...@users.noreply.github.com>
AuthorDate: Fri Feb 10 08:34:18 2023 +0800
[IOTDB-5021] Adapting all schemaIT to add Schema_File mode (#9034)
---
.../iotdb/db/it/schema/AbstractSchemaIT.java | 24 ++++++++++++---
.../db/it/schema/IoTDBAutoCreateSchemaIT.java | 12 ++++----
.../it/schema/IoTDBCreateAlignedTimeseriesIT.java | 13 +++++----
.../db/it/schema/IoTDBCreateStorageGroupIT.java | 12 ++++----
.../db/it/schema/IoTDBCreateTimeseriesIT.java | 24 ++++++++-------
.../db/it/schema/IoTDBDeactivateTemplateIT.java | 12 ++++----
.../it/schema/IoTDBDeleteAlignedTimeseriesIT.java | 15 +++++-----
.../db/it/schema/IoTDBDeleteStorageGroupIT.java | 12 ++++----
.../iotdb/db/it/schema/IoTDBSchemaTemplateIT.java | 12 ++++----
.../db/it/schema/IoTDBSortedShowTimeseriesIT.java | 29 ++++++++++--------
.../apache/iotdb/db/it/schema/IoTDBTagAlterIT.java | 14 +++++----
.../org/apache/iotdb/db/it/schema/IoTDBTagIT.java | 34 +++++++---------------
12 files changed, 119 insertions(+), 94 deletions(-)
diff --git a/integration-test/src/test/java/org/apache/iotdb/db/it/schema/AbstractSchemaIT.java b/integration-test/src/test/java/org/apache/iotdb/db/it/schema/AbstractSchemaIT.java
index 38b2656554..380be26487 100644
--- a/integration-test/src/test/java/org/apache/iotdb/db/it/schema/AbstractSchemaIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/db/it/schema/AbstractSchemaIT.java
@@ -22,6 +22,7 @@ import org.apache.iotdb.it.env.EnvFactory;
import org.apache.iotdb.it.framework.IoTDBTestRunnerWithParametersFactory;
import net.jcip.annotations.NotThreadSafe;
+import org.apache.commons.lang3.StringUtils;
import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
@@ -59,16 +60,31 @@ public abstract class AbstractSchemaIT {
break;
case SchemaFile:
EnvFactory.getEnv().getConfig().getCommonConfig().setSchemaEngineMode("Schema_File");
- EnvFactory.getEnv()
- .getConfig()
- .getCommonConfig()
- .setSchemaMemoryAllocate("3:10000:5000:5000");
+ allocateMemoryForSchemaRegion(3600);
break;
}
}
public void tearDown() throws Exception {}
+ /**
+ * Set memory allocated to the SchemaRegion. There is no guarantee that the memory allocated to
+ * the schemaRegion will be exactly equal to the set memory, but it will be greater than the set
+ * memory.
+ *
+ * @param allocateMemoryForSchemaRegion bytes
+ */
+ protected void allocateMemoryForSchemaRegion(int allocateMemoryForSchemaRegion) {
+ int schemaAllMemory = 25742540;
+ int sumProportion = schemaAllMemory / allocateMemoryForSchemaRegion;
+ int[] proportion =
+ new int[] {1, (sumProportion - 1) / 2, (sumProportion - 1) / 4, (sumProportion - 1) / 4};
+ EnvFactory.getEnv()
+ .getConfig()
+ .getCommonConfig()
+ .setSchemaMemoryAllocate(StringUtils.join(proportion, ':'));
+ }
+
enum SchemaTestMode {
Memory,
SchemaFile
diff --git a/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBAutoCreateSchemaIT.java b/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBAutoCreateSchemaIT.java
index 9c1939156b..5fea0be42d 100644
--- a/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBAutoCreateSchemaIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBAutoCreateSchemaIT.java
@@ -21,7 +21,6 @@ package org.apache.iotdb.db.it.schema;
import org.apache.iotdb.db.mpp.common.header.ColumnHeaderConstant;
import org.apache.iotdb.it.env.EnvFactory;
-import org.apache.iotdb.it.framework.IoTDBTestRunner;
import org.apache.iotdb.itbase.category.ClusterIT;
import org.apache.iotdb.itbase.category.LocalStandaloneIT;
import org.apache.iotdb.itbase.constant.TestConstant;
@@ -31,7 +30,6 @@ import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import org.junit.runner.RunWith;
import java.sql.Connection;
import java.sql.DatabaseMetaData;
@@ -46,19 +44,23 @@ import java.util.Set;
* Notice that, all test begins with "IoTDB" is integration test. All test which will start the
* IoTDB server should be defined as integration test.
*/
-// TODO: extends AbstractSchemaIT
-@RunWith(IoTDBTestRunner.class)
@Category({LocalStandaloneIT.class, ClusterIT.class})
-public class IoTDBAutoCreateSchemaIT {
+public class IoTDBAutoCreateSchemaIT extends AbstractSchemaIT {
+
+ public IoTDBAutoCreateSchemaIT(SchemaTestMode schemaTestMode) {
+ super(schemaTestMode);
+ }
@Before
public void setUp() throws Exception {
+ super.setUp();
EnvFactory.getEnv().initClusterEnvironment();
}
@After
public void tearDown() throws Exception {
EnvFactory.getEnv().cleanClusterEnvironment();
+ super.tearDown();
}
/** create timeseries without setting database */
diff --git a/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBCreateAlignedTimeseriesIT.java b/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBCreateAlignedTimeseriesIT.java
index 79c5020383..09449e49d4 100644
--- a/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBCreateAlignedTimeseriesIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBCreateAlignedTimeseriesIT.java
@@ -20,7 +20,6 @@ package org.apache.iotdb.db.it.schema;
import org.apache.iotdb.db.mpp.common.header.ColumnHeaderConstant;
import org.apache.iotdb.it.env.EnvFactory;
-import org.apache.iotdb.it.framework.IoTDBTestRunner;
import org.apache.iotdb.itbase.category.ClusterIT;
import org.apache.iotdb.itbase.category.LocalStandaloneIT;
@@ -29,7 +28,6 @@ import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import org.junit.runner.RunWith;
import java.sql.Connection;
import java.sql.ResultSet;
@@ -40,18 +38,22 @@ import java.sql.Statement;
* Notice that, all test begins with "IoTDB" is integration test. All test which will start the
* IoTDB server should be defined as integration test.
*/
-// TODO: extends AbstractSchemaIT
-@RunWith(IoTDBTestRunner.class)
-public class IoTDBCreateAlignedTimeseriesIT {
+public class IoTDBCreateAlignedTimeseriesIT extends AbstractSchemaIT {
+
+ public IoTDBCreateAlignedTimeseriesIT(SchemaTestMode schemaTestMode) {
+ super(schemaTestMode);
+ }
@Before
public void setUp() throws Exception {
+ super.setUp();
EnvFactory.getEnv().initClusterEnvironment();
}
@After
public void tearDown() throws Exception {
EnvFactory.getEnv().cleanClusterEnvironment();
+ super.tearDown();
}
@Test
@@ -83,7 +85,6 @@ public class IoTDBCreateAlignedTimeseriesIT {
}
@Test
- @Category({ClusterIT.class})
public void testCreateAlignedTimeseriesWithDeletion() throws Exception {
String[] timeSeriesArray =
new String[] {
diff --git a/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBCreateStorageGroupIT.java b/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBCreateStorageGroupIT.java
index c55a20ffe4..9687436e24 100644
--- a/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBCreateStorageGroupIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBCreateStorageGroupIT.java
@@ -21,7 +21,6 @@ package org.apache.iotdb.db.it.schema;
import org.apache.iotdb.db.mpp.common.header.ColumnHeaderConstant;
import org.apache.iotdb.it.env.EnvFactory;
-import org.apache.iotdb.it.framework.IoTDBTestRunner;
import org.apache.iotdb.itbase.category.ClusterIT;
import org.apache.iotdb.itbase.category.LocalStandaloneIT;
import org.apache.iotdb.rpc.TSStatusCode;
@@ -31,7 +30,6 @@ import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import org.junit.runner.RunWith;
import java.sql.Connection;
import java.sql.ResultSet;
@@ -47,19 +45,23 @@ import static org.junit.Assert.fail;
* Notice that, all test begins with "IoTDB" is integration test. All test which will start the
* IoTDB server should be defined as integration test.
*/
-// TODO: extends AbstractSchemaIT
-@RunWith(IoTDBTestRunner.class)
@Category({LocalStandaloneIT.class, ClusterIT.class})
-public class IoTDBCreateStorageGroupIT {
+public class IoTDBCreateStorageGroupIT extends AbstractSchemaIT {
+
+ public IoTDBCreateStorageGroupIT(SchemaTestMode schemaTestMode) {
+ super(schemaTestMode);
+ }
@Before
public void setUp() throws Exception {
+ super.setUp();
EnvFactory.getEnv().initClusterEnvironment();
}
@After
public void tearDown() throws Exception {
EnvFactory.getEnv().cleanClusterEnvironment();
+ super.tearDown();
}
/** The test creates three databases */
diff --git a/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBCreateTimeseriesIT.java b/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBCreateTimeseriesIT.java
index 78774489f6..2c90c0d315 100644
--- a/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBCreateTimeseriesIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBCreateTimeseriesIT.java
@@ -21,16 +21,14 @@ package org.apache.iotdb.db.it.schema;
import org.apache.iotdb.db.mpp.common.header.ColumnHeaderConstant;
import org.apache.iotdb.it.env.EnvFactory;
-import org.apache.iotdb.it.framework.IoTDBTestRunner;
import org.apache.iotdb.itbase.category.ClusterIT;
import org.apache.iotdb.itbase.category.LocalStandaloneIT;
-import org.junit.AfterClass;
+import org.junit.After;
import org.junit.Assert;
-import org.junit.BeforeClass;
+import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import org.junit.runner.RunWith;
import java.sql.Connection;
import java.sql.ResultSet;
@@ -45,19 +43,23 @@ import static org.junit.Assert.fail;
* Notice that, all test begins with "IoTDB" is integration test. All test which will start the
* IoTDB server should be defined as integration test.
*/
-// TODO: extends AbstractSchemaIT
-@RunWith(IoTDBTestRunner.class)
@Category({LocalStandaloneIT.class, ClusterIT.class})
-public class IoTDBCreateTimeseriesIT {
+public class IoTDBCreateTimeseriesIT extends AbstractSchemaIT {
- @BeforeClass
- public static void setUp() throws Exception {
+ public IoTDBCreateTimeseriesIT(SchemaTestMode schemaTestMode) {
+ super(schemaTestMode);
+ }
+
+ @Before
+ public void setUp() throws Exception {
+ super.setUp();
EnvFactory.getEnv().initClusterEnvironment();
}
- @AfterClass
- public static void tearDown() throws Exception {
+ @After
+ public void tearDown() throws Exception {
EnvFactory.getEnv().cleanClusterEnvironment();
+ super.tearDown();
}
/** Test if creating a time series will cause the database with same name to disappear */
diff --git a/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBDeactivateTemplateIT.java b/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBDeactivateTemplateIT.java
index 8514d69b14..5b6d4ebda3 100644
--- a/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBDeactivateTemplateIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBDeactivateTemplateIT.java
@@ -20,7 +20,6 @@
package org.apache.iotdb.db.it.schema;
import org.apache.iotdb.it.env.EnvFactory;
-import org.apache.iotdb.it.framework.IoTDBTestRunner;
import org.apache.iotdb.itbase.category.ClusterIT;
import org.apache.iotdb.rpc.TSStatusCode;
@@ -29,7 +28,6 @@ import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import org.junit.runner.RunWith;
import java.sql.Connection;
import java.sql.ResultSet;
@@ -37,13 +35,16 @@ import java.sql.ResultSetMetaData;
import java.sql.SQLException;
import java.sql.Statement;
-// TODO: extends AbstractSchemaIT
-@RunWith(IoTDBTestRunner.class)
@Category({ClusterIT.class})
-public class IoTDBDeactivateTemplateIT {
+public class IoTDBDeactivateTemplateIT extends AbstractSchemaIT {
+
+ public IoTDBDeactivateTemplateIT(SchemaTestMode schemaTestMode) {
+ super(schemaTestMode);
+ }
@Before
public void setUp() throws Exception {
+ super.setUp();
EnvFactory.getEnv().initClusterEnvironment();
prepareTemplate();
@@ -52,6 +53,7 @@ public class IoTDBDeactivateTemplateIT {
@After
public void tearDown() throws Exception {
EnvFactory.getEnv().cleanClusterEnvironment();
+ super.tearDown();
}
private void prepareTemplate() throws SQLException {
diff --git a/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBDeleteAlignedTimeseriesIT.java b/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBDeleteAlignedTimeseriesIT.java
index 1d07d37357..9f81b6476f 100644
--- a/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBDeleteAlignedTimeseriesIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBDeleteAlignedTimeseriesIT.java
@@ -21,7 +21,6 @@ package org.apache.iotdb.db.it.schema;
import org.apache.iotdb.db.mpp.common.header.ColumnHeaderConstant;
import org.apache.iotdb.it.env.EnvFactory;
-import org.apache.iotdb.it.framework.IoTDBTestRunner;
import org.apache.iotdb.itbase.category.ClusterIT;
import org.junit.After;
@@ -29,25 +28,26 @@ import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import org.junit.runner.RunWith;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.ResultSetMetaData;
-import java.sql.SQLException;
import java.sql.Statement;
import static org.apache.iotdb.itbase.constant.TestConstant.TIMESTAMP_STR;
import static org.apache.iotdb.itbase.constant.TestConstant.count;
import static org.junit.Assert.fail;
-// TODO: extends AbstractSchemaIT
-@RunWith(IoTDBTestRunner.class)
@Category({ClusterIT.class})
-public class IoTDBDeleteAlignedTimeseriesIT {
+public class IoTDBDeleteAlignedTimeseriesIT extends AbstractSchemaIT {
+
+ public IoTDBDeleteAlignedTimeseriesIT(SchemaTestMode schemaTestMode) {
+ super(schemaTestMode);
+ }
@Before
- public void setUp() throws ClassNotFoundException, SQLException, InterruptedException {
+ public void setUp() throws Exception {
+ super.setUp();
EnvFactory.getEnv().getConfig().getCommonConfig().setMemtableSizeThreshold(2);
EnvFactory.getEnv().initClusterEnvironment();
}
@@ -55,6 +55,7 @@ public class IoTDBDeleteAlignedTimeseriesIT {
@After
public void tearDown() throws Exception {
EnvFactory.getEnv().cleanClusterEnvironment();
+ super.tearDown();
}
@Test
diff --git a/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBDeleteStorageGroupIT.java b/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBDeleteStorageGroupIT.java
index 1a4010bb9a..8063023328 100644
--- a/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBDeleteStorageGroupIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBDeleteStorageGroupIT.java
@@ -19,7 +19,6 @@
package org.apache.iotdb.db.it.schema;
import org.apache.iotdb.it.env.EnvFactory;
-import org.apache.iotdb.it.framework.IoTDBTestRunner;
import org.apache.iotdb.itbase.category.ClusterIT;
import org.apache.iotdb.itbase.category.LocalStandaloneIT;
@@ -27,7 +26,6 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import org.junit.runner.RunWith;
import java.sql.Connection;
import java.sql.ResultSet;
@@ -40,19 +38,23 @@ import java.util.List;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
-// TODO: extends AbstractSchemaIT
-@RunWith(IoTDBTestRunner.class)
@Category({LocalStandaloneIT.class, ClusterIT.class})
-public class IoTDBDeleteStorageGroupIT {
+public class IoTDBDeleteStorageGroupIT extends AbstractSchemaIT {
+
+ public IoTDBDeleteStorageGroupIT(SchemaTestMode schemaTestMode) {
+ super(schemaTestMode);
+ }
@Before
public void setUp() throws Exception {
+ super.setUp();
EnvFactory.getEnv().initClusterEnvironment();
}
@After
public void tearDown() throws Exception {
EnvFactory.getEnv().cleanClusterEnvironment();
+ super.tearDown();
}
@Test
diff --git a/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBSchemaTemplateIT.java b/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBSchemaTemplateIT.java
index bc6b0f6a49..876e329198 100644
--- a/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBSchemaTemplateIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBSchemaTemplateIT.java
@@ -20,7 +20,6 @@ package org.apache.iotdb.db.it.schema;
import org.apache.iotdb.db.mpp.common.header.ColumnHeaderConstant;
import org.apache.iotdb.it.env.EnvFactory;
-import org.apache.iotdb.it.framework.IoTDBTestRunner;
import org.apache.iotdb.itbase.category.ClusterIT;
import org.apache.iotdb.rpc.TSStatusCode;
@@ -29,7 +28,6 @@ import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import org.junit.runner.RunWith;
import java.sql.Connection;
import java.sql.ResultSet;
@@ -44,13 +42,16 @@ import java.util.Set;
* Notice that, all test begins with "IoTDB" is integration test. All test which will start the
* IoTDB server should be defined as integration test.
*/
-// TODO: extends AbstractSchemaIT
-@RunWith(IoTDBTestRunner.class)
@Category({ClusterIT.class})
-public class IoTDBSchemaTemplateIT {
+public class IoTDBSchemaTemplateIT extends AbstractSchemaIT {
+
+ public IoTDBSchemaTemplateIT(SchemaTestMode schemaTestMode) {
+ super(schemaTestMode);
+ }
@Before
public void setUp() throws Exception {
+ super.setUp();
EnvFactory.getEnv().initClusterEnvironment();
prepareTemplate();
@@ -59,6 +60,7 @@ public class IoTDBSchemaTemplateIT {
@After
public void tearDown() throws Exception {
EnvFactory.getEnv().cleanClusterEnvironment();
+ super.tearDown();
}
@Test
diff --git a/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBSortedShowTimeseriesIT.java b/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBSortedShowTimeseriesIT.java
index 95d03d5536..3c70fc0511 100644
--- a/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBSortedShowTimeseriesIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBSortedShowTimeseriesIT.java
@@ -20,15 +20,13 @@ package org.apache.iotdb.db.it.schema;
import org.apache.iotdb.db.mpp.common.header.ColumnHeaderConstant;
import org.apache.iotdb.it.env.EnvFactory;
-import org.apache.iotdb.it.framework.IoTDBTestRunner;
import org.apache.iotdb.itbase.category.ClusterIT;
import org.apache.iotdb.itbase.category.LocalStandaloneIT;
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
+import org.junit.After;
+import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import org.junit.runner.RunWith;
import java.sql.Connection;
import java.sql.ResultSet;
@@ -42,10 +40,8 @@ import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
-// TODO: extends AbstractSchemaIT
-@RunWith(IoTDBTestRunner.class)
@Category({LocalStandaloneIT.class, ClusterIT.class})
-public class IoTDBSortedShowTimeseriesIT {
+public class IoTDBSortedShowTimeseriesIT extends AbstractSchemaIT {
private static String[] sqls =
new String[] {
@@ -96,19 +92,28 @@ public class IoTDBSortedShowTimeseriesIT {
"insert into root.turbine.d2(timestamp,s0,s1,s3) values(6,6,6,6)"
};
- @BeforeClass
- public static void setUp() throws Exception {
+ public IoTDBSortedShowTimeseriesIT(SchemaTestMode schemaTestMode) {
+ super(schemaTestMode);
+ }
+
+ @Before
+ public void setUp() throws Exception {
+ super.setUp();
+ if (schemaTestMode.equals(SchemaTestMode.SchemaFile)) {
+ allocateMemoryForSchemaRegion(5500);
+ }
EnvFactory.getEnv().initClusterEnvironment();
createSchema();
}
- @AfterClass
- public static void tearDown() throws Exception {
+ @After
+ public void tearDown() throws Exception {
EnvFactory.getEnv().cleanClusterEnvironment();
+ super.tearDown();
}
@Test
- public void showTimeseriesOrderByHeatTest1() throws ClassNotFoundException {
+ public void showTimeseriesOrderByHeatTest1() {
List<String> retArray1 =
Arrays.asList(
diff --git a/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBTagAlterIT.java b/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBTagAlterIT.java
index 03adf690a5..d37c241df3 100644
--- a/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBTagAlterIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBTagAlterIT.java
@@ -20,7 +20,6 @@ package org.apache.iotdb.db.it.schema;
import org.apache.iotdb.db.mpp.common.header.ColumnHeaderConstant;
import org.apache.iotdb.it.env.EnvFactory;
-import org.apache.iotdb.it.framework.IoTDBTestRunner;
import org.apache.iotdb.itbase.category.ClusterIT;
import org.apache.iotdb.itbase.category.LocalStandaloneIT;
@@ -28,7 +27,6 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import org.junit.runner.RunWith;
import java.sql.Connection;
import java.sql.ResultSet;
@@ -39,19 +37,23 @@ import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
-// TODO: extends AbstractSchemaIT
-@RunWith(IoTDBTestRunner.class)
@Category({LocalStandaloneIT.class, ClusterIT.class})
-public class IoTDBTagAlterIT {
+public class IoTDBTagAlterIT extends AbstractSchemaIT {
+
+ public IoTDBTagAlterIT(SchemaTestMode schemaTestMode) {
+ super(schemaTestMode);
+ }
@Before
- public void setUp() throws InterruptedException {
+ public void setUp() throws Exception {
+ super.setUp();
EnvFactory.getEnv().initClusterEnvironment();
}
@After
public void tearDown() throws Exception {
EnvFactory.getEnv().cleanClusterEnvironment();
+ super.tearDown();
}
@Test
diff --git a/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBTagIT.java b/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBTagIT.java
index dd353961f0..98e0e40863 100644
--- a/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBTagIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBTagIT.java
@@ -20,7 +20,6 @@ package org.apache.iotdb.db.it.schema;
import org.apache.iotdb.db.mpp.common.header.ColumnHeaderConstant;
import org.apache.iotdb.it.env.EnvFactory;
-import org.apache.iotdb.it.framework.IoTDBTestRunner;
import org.apache.iotdb.itbase.category.ClusterIT;
import org.apache.iotdb.itbase.category.LocalStandaloneIT;
@@ -28,7 +27,6 @@ import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.experimental.categories.Category;
-import org.junit.runner.RunWith;
import java.sql.Connection;
import java.sql.ResultSet;
@@ -44,22 +42,29 @@ import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
-// TODO: extends AbstractSchemaIT
-@RunWith(IoTDBTestRunner.class)
-public class IoTDBTagIT {
+@Category({LocalStandaloneIT.class, ClusterIT.class})
+public class IoTDBTagIT extends AbstractSchemaIT {
+
+ public IoTDBTagIT(SchemaTestMode schemaTestMode) {
+ super(schemaTestMode);
+ }
@Before
public void setUp() throws Exception {
+ super.setUp();
+ if (schemaTestMode.equals(SchemaTestMode.SchemaFile)) {
+ allocateMemoryForSchemaRegion(5500);
+ }
EnvFactory.getEnv().initClusterEnvironment();
}
@After
public void tearDown() throws Exception {
EnvFactory.getEnv().cleanClusterEnvironment();
+ super.tearDown();
}
@Test
- @Category({LocalStandaloneIT.class, ClusterIT.class})
public void createOneTimeseriesTest() {
List<String> ret =
Collections.singletonList(
@@ -106,7 +111,6 @@ public class IoTDBTagIT {
}
@Test
- @Category({LocalStandaloneIT.class, ClusterIT.class})
public void createMultiTimeseriesTest() {
List<String> ret =
Arrays.asList(
@@ -161,7 +165,6 @@ public class IoTDBTagIT {
}
@Test
- @Category({LocalStandaloneIT.class, ClusterIT.class})
public void showTimeseriesTest() {
List<String> ret =
Arrays.asList(
@@ -215,7 +218,6 @@ public class IoTDBTagIT {
}
@Test
- @Category({LocalStandaloneIT.class, ClusterIT.class})
public void createDuplicateAliasTimeseriesTest1() {
String sql1 =
"create timeseries root.turbine.d3.s1(temperature) with datatype=FLOAT, encoding=RLE, compression=SNAPPY "
@@ -243,7 +245,6 @@ public class IoTDBTagIT {
}
@Test
- @Category({LocalStandaloneIT.class, ClusterIT.class})
public void createDuplicateAliasTimeseriesTest2() {
String sql1 =
"create timeseries root.turbine.d4.s1(temperature) with datatype=FLOAT, encoding=RLE, compression=SNAPPY "
@@ -269,7 +270,6 @@ public class IoTDBTagIT {
}
@Test
- @Category({LocalStandaloneIT.class, ClusterIT.class})
public void createDuplicateAliasTimeseriesTest3() {
String sql1 =
"create timeseries root.turbine.d5.s1(temperature) with datatype=FLOAT, encoding=RLE, compression=SNAPPY "
@@ -296,7 +296,6 @@ public class IoTDBTagIT {
}
@Test
- @Category({LocalStandaloneIT.class, ClusterIT.class})
public void queryWithAliasTest() {
List<String> ret =
Collections.singletonList(
@@ -341,7 +340,6 @@ public class IoTDBTagIT {
}
@Test
- @Category({LocalStandaloneIT.class, ClusterIT.class})
public void queryWithLimitTest() {
List<String> ret =
Arrays.asList(
@@ -396,7 +394,6 @@ public class IoTDBTagIT {
}
@Test
- @Category({ClusterIT.class})
public void deleteTest() {
List<String> ret1 =
Arrays.asList(
@@ -480,7 +477,6 @@ public class IoTDBTagIT {
}
@Test
- @Category({ClusterIT.class})
public void deleteWithAliasTest() {
List<String> ret1 =
Arrays.asList(
@@ -564,7 +560,6 @@ public class IoTDBTagIT {
}
@Test
- @Category({LocalStandaloneIT.class, ClusterIT.class})
public void queryWithWhereTest1() {
List<String> ret1 =
Arrays.asList(
@@ -688,7 +683,6 @@ public class IoTDBTagIT {
}
@Test
- @Category({LocalStandaloneIT.class, ClusterIT.class})
public void queryWithWhereTest2() {
Set<String> ret = new HashSet<>();
ret.add(
@@ -809,7 +803,6 @@ public class IoTDBTagIT {
}
@Test
- @Category({ClusterIT.class})
public void queryWithWhereAndDeleteTest() {
Set<String> ret = new HashSet<>();
ret.add(
@@ -892,7 +885,6 @@ public class IoTDBTagIT {
}
@Test
- @Category({LocalStandaloneIT.class, ClusterIT.class})
public void queryWithWhereContainsTest() {
Set<String> ret = new HashSet<>();
ret.add(
@@ -1012,7 +1004,6 @@ public class IoTDBTagIT {
}
@Test
- @Category({LocalStandaloneIT.class, ClusterIT.class})
public void queryWithWhereOnNoneTagTest() {
String[] sqls = {
"create timeseries root.turbine.d0.s0(temperature) with datatype=FLOAT, encoding=RLE, compression=SNAPPY "
@@ -1059,7 +1050,6 @@ public class IoTDBTagIT {
}
@Test
- @Category({LocalStandaloneIT.class, ClusterIT.class})
public void sameNameTest() {
String sql =
"create timeseries root.turbine.d1.s1(temperature) with datatype=FLOAT, encoding=RLE, compression=SNAPPY "
@@ -1075,7 +1065,6 @@ public class IoTDBTagIT {
}
@Test
- @Category({LocalStandaloneIT.class, ClusterIT.class})
public void deleteStorageGroupTest() {
List<String> ret =
Collections.singletonList(
@@ -1125,7 +1114,6 @@ public class IoTDBTagIT {
}
@Test
- @Category({LocalStandaloneIT.class, ClusterIT.class})
public void insertWithAliasTest() {
List<String> ret = Collections.singletonList("1,36.5,36.5");
String[] sqls = {