This is an automated email from the ASF dual-hosted git repository.
ericpai 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 3c88dfb6aa [IOTDB-3508] Enhance some features of the IT framework
(#6300)
3c88dfb6aa is described below
commit 3c88dfb6aaf4f5e9fa01331e5ad7fbb9e57448d1
Author: Junqing WANG <[email protected]>
AuthorDate: Mon Jun 20 14:22:13 2022 +0800
[IOTDB-3508] Enhance some features of the IT framework (#6300)
---
.github/workflows/cluster-it.yml | 10 +-
.../{cluster-it.yml => standalone-it-for-mpp.yml} | 20 ++-
integration-test/pom.xml | 138 ++++++++++++++++++++-
.../assembly/{cluster-test.xml => mpp-test.xml} | 0
.../env/{ClusterEnvBase.java => AbstractEnv.java} | 119 ++++++++++--------
...usterNodeBase.java => AbstractNodeWrapper.java} | 8 +-
.../java/org/apache/iotdb/it/env/Cluster1Env.java | 2 +-
.../org/apache/iotdb/it/env/ConfigFactory.java | 9 +-
.../{ConfigNode.java => ConfigNodeWrapper.java} | 4 +-
.../it/env/{DataNode.java => DataNodeWrapper.java} | 8 +-
.../java/org/apache/iotdb/it/env/EnvFactory.java | 7 +-
.../env/{ClusterEnvConfig.java => MppConfig.java} | 21 ++--
...emoteEnvConfig.java => RemoteServerConfig.java} | 2 +-
...ter1Env.java => StandaloneDataNodeWrapper.java} | 30 +++--
.../apache/iotdb/it/env/StandaloneOnMppEnv.java | 72 +++++++++++
.../org/apache/iotdb/itbase/env/BaseConfig.java | 8 +-
.../env/{BaseNode.java => BaseNodeWrapper.java} | 2 +-
integration-test/src/script/append-to-env.sh | 32 +++++
.../org/apache/iotdb/db/it/IoTDBExampleIT.java | 4 +-
.../iotdb/db/it/aligned/AlignedWriteUtil.java | 7 +-
.../db/it/aligned/IoTDBInsertAlignedValues2IT.java | 2 +-
.../db/it/aligned/IoTDBInsertAlignedValues3IT.java | 2 +-
.../db/it/aligned/IoTDBInsertAlignedValues4IT.java | 2 +-
.../db/it/aligned/IoTDBInsertAlignedValuesIT.java | 2 +-
.../db/it/udf/IoTDBUDTFBuiltinFunctionIT.java | 7 ++
25 files changed, 387 insertions(+), 131 deletions(-)
diff --git a/.github/workflows/cluster-it.yml b/.github/workflows/cluster-it.yml
index 66709637b0..17b366a796 100644
--- a/.github/workflows/cluster-it.yml
+++ b/.github/workflows/cluster-it.yml
@@ -63,15 +63,7 @@ jobs:
# we can skip influxdb-protocol because it has been tested separately
in influxdb-protocol.yml
run: |
mvn clean verify \
- -Dsession.test.skip=true \
- -Diotdb.test.skip=true \
- -Dcluster.test.skip=true \
- -Dtsfile.test.skip=true \
- -Dcommons.test.skip=true \
- -Dconfignode.test.skip=true \
- -Dconsensus.test.skip=true \
- -Djdbc.test.skip=true \
- -Dmetrics.test.skip=true \
+ -DskipUTs \
-pl integration-test \
-am -PClusterIT
- name: Upload Artifact
diff --git a/.github/workflows/cluster-it.yml
b/.github/workflows/standalone-it-for-mpp.yml
similarity index 82%
copy from .github/workflows/cluster-it.yml
copy to .github/workflows/standalone-it-for-mpp.yml
index 66709637b0..09f93cf1ad 100644
--- a/.github/workflows/cluster-it.yml
+++ b/.github/workflows/standalone-it-for-mpp.yml
@@ -1,4 +1,4 @@
-name: New Cluster IT
+name: New Standalone IT
on:
push:
@@ -22,7 +22,7 @@ env:
MAVEN_OPTS: -Dhttp.keepAlive=false -Dmaven.wagon.http.pool=false
-Dmaven.wagon.http.retryHandler.class=standard
-Dmaven.wagon.http.retryHandler.count=3
jobs:
- ClusterIT:
+ unix:
strategy:
fail-fast: false
max-parallel: 20
@@ -63,21 +63,15 @@ jobs:
# we can skip influxdb-protocol because it has been tested separately
in influxdb-protocol.yml
run: |
mvn clean verify \
- -Dsession.test.skip=true \
- -Diotdb.test.skip=true \
- -Dcluster.test.skip=true \
- -Dtsfile.test.skip=true \
- -Dcommons.test.skip=true \
- -Dconfignode.test.skip=true \
- -Dconsensus.test.skip=true \
- -Djdbc.test.skip=true \
- -Dmetrics.test.skip=true \
+ -DskipUTs \
+ -DintegrationTest.forkCount=2 \
-pl integration-test \
- -am -PClusterIT
+ -am -PLocalStandaloneOnMppIT
- name: Upload Artifact
if: failure()
uses: actions/upload-artifact@v3
with:
- name: cluster-log-java${{ matrix.java }}-${{ runner.os }}
+ name: standalone-log-java${{ matrix.java }}-${{ runner.os }}
path: integration-test/target/cluster-logs
retention-days: 1
+
diff --git a/integration-test/pom.xml b/integration-test/pom.xml
index 23216c7ff3..0369185e83 100644
--- a/integration-test/pom.xml
+++ b/integration-test/pom.xml
@@ -28,6 +28,11 @@
<relativePath>../pom.xml</relativePath>
</parent>
<artifactId>integration-test</artifactId>
+ <properties>
+ <integrationTest.forkCount>1</integrationTest.forkCount>
+
<integrationTest.randomSelectWriteNode>true</integrationTest.randomSelectWriteNode>
+
<integrationTest.readAndVerifyWithMultiNode>true</integrationTest.readAndVerifyWithMultiNode>
+ </properties>
<dependencies>
<dependency>
<groupId>org.apache.iotdb</groupId>
@@ -240,7 +245,7 @@
</goals>
<configuration>
<descriptors>
-
<descriptor>src/assembly/cluster-test.xml</descriptor>
+
<descriptor>src/assembly/mpp-test.xml</descriptor>
</descriptors>
<finalName>template-node</finalName>
<appendAssemblyId>false</appendAssemblyId>
@@ -248,6 +253,26 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <version>1.6.0</version>
+ <executions>
+ <execution>
+ <id>append</id>
+ <phase>package</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <executable>bash</executable>
+ <arguments>
+
<argument>src/script/append-to-env.sh</argument>
+ </arguments>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
@@ -263,10 +288,12 @@
<useSystemClassLoader>false</useSystemClassLoader>
<parallel>classes</parallel>
<useUnlimitedThreads>true</useUnlimitedThreads>
- <forkCount>1</forkCount>
+
<forkCount>${integrationTest.forkCount}</forkCount>
<reuseForks>false</reuseForks>
<systemPropertyVariables>
<TestEnv>Cluster1</TestEnv>
+
<RandomSelectWriteNode>${integrationTest.randomSelectWriteNode}</RandomSelectWriteNode>
+
<ReadAndVerifyWithMultiNode>${integrationTest.readAndVerifyWithMultiNode}</ReadAndVerifyWithMultiNode>
</systemPropertyVariables>
<summaryFile>target/failsafe-reports/failsafe-summary-ClusterIT.xml</summaryFile>
</configuration>
@@ -287,5 +314,112 @@
</plugins>
</build>
</profile>
+ <profile>
+ <id>LocalStandaloneOnMppIT</id>
+ <properties>
+
<test.includedGroups>org.apache.iotdb.itbase.category.LocalStandaloneIT</test.includedGroups>
+ <test.excludedGroups/>
+ </properties>
+ <activation>
+ <activeByDefault>false</activeByDefault>
+ </activation>
+ <build>
+ <plugins>
+ <!-- skip default-test -->
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>default-test</id>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-assembly-plugin</artifactId>
+ <version>${maven.assembly.version}</version>
+ <executions>
+ <!-- Package binaries-->
+ <execution>
+ <id>cluster-test-assembly</id>
+ <phase>package</phase>
+ <goals>
+ <goal>single</goal>
+ </goals>
+ <configuration>
+ <descriptors>
+
<descriptor>src/assembly/mpp-test.xml</descriptor>
+ </descriptors>
+ <finalName>template-node</finalName>
+ <appendAssemblyId>false</appendAssemblyId>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>exec-maven-plugin</artifactId>
+ <version>1.6.0</version>
+ <executions>
+ <execution>
+ <id>append</id>
+ <phase>package</phase>
+ <goals>
+ <goal>exec</goal>
+ </goals>
+ <configuration>
+ <executable>bash</executable>
+ <arguments>
+
<argument>src/script/append-to-env.sh</argument>
+ </arguments>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>standalone-integration-test</id>
+ <goals>
+ <goal>integration-test</goal>
+ </goals>
+ <configuration>
+ <groups>${test.includedGroups}</groups>
+
<excludedGroups>${test.excludedGroups}</excludedGroups>
+
<useSystemClassLoader>false</useSystemClassLoader>
+ <parallel>classes</parallel>
+
<useUnlimitedThreads>true</useUnlimitedThreads>
+
<forkCount>${integrationTest.forkCount}</forkCount>
+ <reuseForks>false</reuseForks>
+ <systemPropertyVariables>
+ <TestEnv>LocalStandaloneOnMpp</TestEnv>
+
<RandomSelectWriteNode>false</RandomSelectWriteNode>
+
<ReadAndVerifyWithMultiNode>false</ReadAndVerifyWithMultiNode>
+ </systemPropertyVariables>
+
<summaryFile>target/failsafe-reports/failsafe-summary-LocalStandaloneOnMppIT.xml</summaryFile>
+ </configuration>
+ </execution>
+ <execution>
+ <id>verify</id>
+ <goals>
+ <goal>verify</goal>
+ </goals>
+ <configuration>
+ <summaryFiles>
+
<summaryFile>target/failsafe-reports/failsafe-summary-LocalStandaloneOnMppIT.xml</summaryFile>
+ </summaryFiles>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
</profiles>
</project>
diff --git a/integration-test/src/assembly/cluster-test.xml
b/integration-test/src/assembly/mpp-test.xml
similarity index 100%
rename from integration-test/src/assembly/cluster-test.xml
rename to integration-test/src/assembly/mpp-test.xml
diff --git
a/integration-test/src/main/java/org/apache/iotdb/it/env/ClusterEnvBase.java
b/integration-test/src/main/java/org/apache/iotdb/it/env/AbstractEnv.java
similarity index 68%
rename from
integration-test/src/main/java/org/apache/iotdb/it/env/ClusterEnvBase.java
rename to
integration-test/src/main/java/org/apache/iotdb/it/env/AbstractEnv.java
index 1a97596600..bc734db5fd 100644
--- a/integration-test/src/main/java/org/apache/iotdb/it/env/ClusterEnvBase.java
+++ b/integration-test/src/main/java/org/apache/iotdb/it/env/AbstractEnv.java
@@ -46,40 +46,43 @@ import java.util.stream.Collectors;
import static org.apache.iotdb.jdbc.Config.VERSION;
import static org.junit.Assert.fail;
-public abstract class ClusterEnvBase implements BaseEnv {
- private static final Logger logger =
LoggerFactory.getLogger(ClusterEnvBase.class);
+public abstract class AbstractEnv implements BaseEnv {
+ private static final Logger logger =
LoggerFactory.getLogger(AbstractEnv.class);
private final int NODE_START_TIMEOUT = 10;
- private List<ConfigNode> configNodes;
- private List<DataNode> dataNodes;
+ protected List<ConfigNodeWrapper> configNodeWrapperList;
+ protected List<DataNodeWrapper> dataNodeWrapperList;
private final Random rand = new Random();
- private String nextTestCase = null;
+ protected String nextTestCase = null;
protected void initEnvironment(int configNodesNum, int dataNodesNum) throws
InterruptedException {
- this.configNodes = new ArrayList<>();
- this.dataNodes = new ArrayList<>();
+ this.configNodeWrapperList = new ArrayList<>();
+ this.dataNodeWrapperList = new ArrayList<>();
final String testName = getTestClassName() + getNextTestCaseString();
- ConfigNode seedConfigNode = new ConfigNode(true, "", testName);
- seedConfigNode.createDir();
- seedConfigNode.changeConfig(null);
- seedConfigNode.start();
- String targetConfignode = seedConfigNode.getIpAndPortString();
- this.configNodes.add(seedConfigNode);
- logger.info("In test " + testName + " SeedConfigNode " +
seedConfigNode.getId() + " started.");
+ ConfigNodeWrapper seedConfigNodeWrapper = new ConfigNodeWrapper(true, "",
testName);
+ seedConfigNodeWrapper.createDir();
+
seedConfigNodeWrapper.changeConfig(ConfigFactory.getConfig().getConfignodeProperties());
+ seedConfigNodeWrapper.start();
+ String targetConfigNode = seedConfigNodeWrapper.getIpAndPortString();
+ this.configNodeWrapperList.add(seedConfigNodeWrapper);
+ logger.info(
+ "In test " + testName + " SeedConfigNode " +
seedConfigNodeWrapper.getId() + " started.");
List<String> configNodeEndpoints = new ArrayList<>();
RequestDelegate<Void> configNodesDelegate = new
SerialRequestDelegate<>(configNodeEndpoints);
for (int i = 1; i < configNodesNum; i++) {
- ConfigNode configNode = new ConfigNode(false, targetConfignode,
testName);
- this.configNodes.add(configNode);
- configNodeEndpoints.add(configNode.getIpAndPortString());
- configNode.createDir();
- configNode.changeConfig(null);
+ ConfigNodeWrapper configNodeWrapper =
+ new ConfigNodeWrapper(false, targetConfigNode, testName);
+ this.configNodeWrapperList.add(configNodeWrapper);
+ configNodeEndpoints.add(configNodeWrapper.getIpAndPortString());
+ configNodeWrapper.createDir();
+ configNodeWrapper.changeConfig(null);
configNodesDelegate.addRequest(
() -> {
- configNode.start();
- logger.info("In test " + testName + " ConfigNode " +
configNode.getId() + " started.");
+ configNodeWrapper.start();
+ logger.info(
+ "In test " + testName + " ConfigNode " +
configNodeWrapper.getId() + " started.");
return null;
});
}
@@ -94,15 +97,16 @@ public abstract class ClusterEnvBase implements BaseEnv {
RequestDelegate<Void> dataNodesDelegate =
new ParallelRequestDelegate<>(dataNodeEndpoints, NODE_START_TIMEOUT);
for (int i = 0; i < dataNodesNum; i++) {
- DataNode dataNode = new DataNode(targetConfignode, testName);
- this.dataNodes.add(dataNode);
- dataNodeEndpoints.add(dataNode.getIpAndPortString());
- dataNode.createDir();
- dataNode.changeConfig(ConfigFactory.getConfig().getEngineProperties());
+ DataNodeWrapper dataNodeWrapper = new DataNodeWrapper(targetConfigNode,
testName);
+ this.dataNodeWrapperList.add(dataNodeWrapper);
+ dataNodeEndpoints.add(dataNodeWrapper.getIpAndPortString());
+ dataNodeWrapper.createDir();
+
dataNodeWrapper.changeConfig(ConfigFactory.getConfig().getEngineProperties());
dataNodesDelegate.addRequest(
() -> {
- dataNode.start();
- logger.info("In test " + testName + " DataNode " +
dataNode.getId() + " started.");
+ dataNodeWrapper.start();
+ logger.info(
+ "In test " + testName + " DataNode " + dataNodeWrapper.getId()
+ " started.");
return null;
});
}
@@ -118,15 +122,15 @@ public abstract class ClusterEnvBase implements BaseEnv {
}
private void cleanupEnvironment() {
- for (DataNode dataNode : this.dataNodes) {
- dataNode.stop();
- dataNode.waitingToShutDown();
- dataNode.destroyDir();
+ for (DataNodeWrapper dataNodeWrapper : this.dataNodeWrapperList) {
+ dataNodeWrapper.stop();
+ dataNodeWrapper.waitingToShutDown();
+ dataNodeWrapper.destroyDir();
}
- for (ConfigNode configNode : this.configNodes) {
- configNode.stop();
- configNode.waitingToShutDown();
- configNode.destroyDir();
+ for (ConfigNodeWrapper configNodeWrapper : this.configNodeWrapperList) {
+ configNodeWrapper.stop();
+ configNodeWrapper.waitingToShutDown();
+ configNodeWrapper.destroyDir();
}
nextTestCase = null;
}
@@ -157,16 +161,18 @@ public abstract class ClusterEnvBase implements BaseEnv {
public void testWorking() throws InterruptedException {
List<String> endpoints =
-
dataNodes.stream().map(ClusterNodeBase::getIpAndPortString).collect(Collectors.toList());
- boolean[] success = new boolean[dataNodes.size()];
- Exception[] exceptions = new Exception[dataNodes.size()];
+ dataNodeWrapperList.stream()
+ .map(AbstractNodeWrapper::getIpAndPortString)
+ .collect(Collectors.toList());
+ boolean[] success = new boolean[dataNodeWrapperList.size()];
+ Exception[] exceptions = new Exception[dataNodeWrapperList.size()];
final int probeTimeout = 5;
AtomicInteger successCount = new AtomicInteger(0);
for (int counter = 0; counter < 30; counter++) {
RequestDelegate<Void> testDelegate = new
ParallelRequestDelegate<>(endpoints, probeTimeout);
- for (int i = 0; i < dataNodes.size(); i++) {
+ for (int i = 0; i < dataNodeWrapperList.size(); i++) {
final int idx = i;
- final String dataNodeEndpoint = dataNodes.get(i).getIpAndPortString();
+ final String dataNodeEndpoint =
dataNodeWrapperList.get(i).getIpAndPortString();
testDelegate.addRequest(
() -> {
if (!success[idx]) {
@@ -186,16 +192,17 @@ public abstract class ClusterEnvBase implements BaseEnv {
} catch (SQLException e) {
// It will never be thrown as it has already caught in the request.
}
- if (successCount.get() == dataNodes.size()) {
+ if (successCount.get() == dataNodeWrapperList.size()) {
logger.info("The whole cluster is ready.");
return;
}
TimeUnit.SECONDS.sleep(1);
}
// The cluster is not ready after 30 times to try
- for (int i = 0; i < dataNodes.size(); i++) {
+ for (int i = 0; i < dataNodeWrapperList.size(); i++) {
if (!success[i] && exceptions[i] != null) {
- logger.error("Connect to {} failed",
dataNodes.get(i).getIpAndPortString(), exceptions[i]);
+ logger.error(
+ "Connect to {} failed",
dataNodeWrapperList.get(i).getIpAndPortString(), exceptions[i]);
}
}
fail("After 30 times retry, the cluster can't work!");
@@ -229,17 +236,29 @@ public abstract class ClusterEnvBase implements BaseEnv {
System.getProperty("User", "root"),
System.getProperty("Password", "root"));
connection.setQueryTimeout(queryTimeout);
+
return connection;
}
@Override
public Connection getConnection(Constant.Version version) throws
SQLException {
- return new ClusterTestConnection(getWriteConnection(version),
getReadConnections(version));
+ if (System.getProperty("ReadAndVerifyWithMultiNode",
"true").equalsIgnoreCase("true")) {
+ return new ClusterTestConnection(getWriteConnection(version),
getReadConnections(version));
+ } else {
+ return getWriteConnection(version).getUnderlyingConnecton();
+ }
}
protected NodeConnection getWriteConnection(Constant.Version version) throws
SQLException {
- // Randomly choose a node for handling write requests
- DataNode dataNode =
this.dataNodes.get(rand.nextInt(this.dataNodes.size()));
+ DataNodeWrapper dataNode;
+
+ if (System.getProperty("RandomSelectWriteNode",
"true").equalsIgnoreCase("true")) {
+ // Randomly choose a node for handling write requests
+ dataNode =
this.dataNodeWrapperList.get(rand.nextInt(this.dataNodeWrapperList.size()));
+ } else {
+ dataNode = this.dataNodeWrapperList.get(0);
+ }
+
String endpoint = dataNode.getIp() + ":" + dataNode.getPort();
Connection writeConnection =
DriverManager.getConnection(
@@ -257,8 +276,8 @@ public abstract class ClusterEnvBase implements BaseEnv {
List<String> endpoints = new ArrayList<>();
ParallelRequestDelegate<NodeConnection> readConnRequestDelegate =
new ParallelRequestDelegate<>(endpoints, NODE_START_TIMEOUT);
- for (DataNode dataNode : this.dataNodes) {
- final String endpoint = dataNode.getIpAndPortString();
+ for (DataNodeWrapper dataNodeWarpper : this.dataNodeWrapperList) {
+ final String endpoint = dataNodeWarpper.getIpAndPortString();
endpoints.add(endpoint);
readConnRequestDelegate.addRequest(
() -> {
@@ -284,7 +303,7 @@ public abstract class ClusterEnvBase implements BaseEnv {
return "?" + VERSION + "=" + version;
}
- private String getNextTestCaseString() {
+ public String getNextTestCaseString() {
if (nextTestCase != null) {
return "_" + nextTestCase;
}
diff --git
a/integration-test/src/main/java/org/apache/iotdb/it/env/ClusterNodeBase.java
b/integration-test/src/main/java/org/apache/iotdb/it/env/AbstractNodeWrapper.java
similarity index 96%
rename from
integration-test/src/main/java/org/apache/iotdb/it/env/ClusterNodeBase.java
rename to
integration-test/src/main/java/org/apache/iotdb/it/env/AbstractNodeWrapper.java
index 408956a1f9..c34ad6be00 100644
---
a/integration-test/src/main/java/org/apache/iotdb/it/env/ClusterNodeBase.java
+++
b/integration-test/src/main/java/org/apache/iotdb/it/env/AbstractNodeWrapper.java
@@ -18,7 +18,7 @@
*/
package org.apache.iotdb.it.env;
-import org.apache.iotdb.itbase.env.BaseNode;
+import org.apache.iotdb.itbase.env.BaseNodeWrapper;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang3.SystemUtils;
@@ -41,8 +41,8 @@ import java.util.stream.IntStream;
import static org.junit.Assert.fail;
-public abstract class ClusterNodeBase implements BaseNode {
- private static final Logger logger =
LoggerFactory.getLogger(ClusterNodeBase.class);
+public abstract class AbstractNodeWrapper implements BaseNodeWrapper {
+ private static final Logger logger =
LoggerFactory.getLogger(AbstractNodeWrapper.class);
private final String templateNodePath =
System.getProperty("user.dir") + File.separator + "target" +
File.separator + "template-node";
private final File NULL_FILE =
@@ -51,7 +51,7 @@ public abstract class ClusterNodeBase implements BaseNode {
private Process instance;
protected final String testName;
- public ClusterNodeBase(String testName) {
+ public AbstractNodeWrapper(String testName) {
this.testName = testName;
}
diff --git
a/integration-test/src/main/java/org/apache/iotdb/it/env/Cluster1Env.java
b/integration-test/src/main/java/org/apache/iotdb/it/env/Cluster1Env.java
index 74029997c5..55f841d2fe 100644
--- a/integration-test/src/main/java/org/apache/iotdb/it/env/Cluster1Env.java
+++ b/integration-test/src/main/java/org/apache/iotdb/it/env/Cluster1Env.java
@@ -21,7 +21,7 @@ package org.apache.iotdb.it.env;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
-public class Cluster1Env extends ClusterEnvBase {
+public class Cluster1Env extends AbstractEnv {
private static final Logger logger =
LoggerFactory.getLogger(Cluster1Env.class);
@Override
diff --git
a/integration-test/src/main/java/org/apache/iotdb/it/env/ConfigFactory.java
b/integration-test/src/main/java/org/apache/iotdb/it/env/ConfigFactory.java
index 83cec2fe64..22f48193b5 100644
--- a/integration-test/src/main/java/org/apache/iotdb/it/env/ConfigFactory.java
+++ b/integration-test/src/main/java/org/apache/iotdb/it/env/ConfigFactory.java
@@ -36,11 +36,12 @@ public class ConfigFactory {
.getDeclaredConstructor()
.newInstance();
break;
- case "Remote":
- config = new RemoteEnvConfig();
- break;
+ case "LocalStandaloneOnMpp":
case "Cluster1":
- config = new ClusterEnvConfig();
+ config = new MppConfig();
+ break;
+ case "Remote":
+ config = new RemoteServerConfig();
break;
default:
throw new ClassNotFoundException("The Property class of TestEnv
not found");
diff --git
a/integration-test/src/main/java/org/apache/iotdb/it/env/ConfigNode.java
b/integration-test/src/main/java/org/apache/iotdb/it/env/ConfigNodeWrapper.java
similarity index 95%
rename from
integration-test/src/main/java/org/apache/iotdb/it/env/ConfigNode.java
rename to
integration-test/src/main/java/org/apache/iotdb/it/env/ConfigNodeWrapper.java
index 8bd7e973da..cd3ff3b4ee 100644
--- a/integration-test/src/main/java/org/apache/iotdb/it/env/ConfigNode.java
+++
b/integration-test/src/main/java/org/apache/iotdb/it/env/ConfigNodeWrapper.java
@@ -23,13 +23,13 @@ import org.apache.commons.lang3.SystemUtils;
import java.io.File;
import java.util.Properties;
-public class ConfigNode extends ClusterNodeBase {
+public class ConfigNodeWrapper extends AbstractNodeWrapper {
private final int consensusPort;
private final String targetConfigNode;
private final int[] portList;
- public ConfigNode(boolean isSeed, String targetConfigNode, String testName) {
+ public ConfigNodeWrapper(boolean isSeed, String targetConfigNode, String
testName) {
super(testName);
portList = super.searchAvailablePorts();
diff --git
a/integration-test/src/main/java/org/apache/iotdb/it/env/DataNode.java
b/integration-test/src/main/java/org/apache/iotdb/it/env/DataNodeWrapper.java
similarity index 93%
rename from integration-test/src/main/java/org/apache/iotdb/it/env/DataNode.java
rename to
integration-test/src/main/java/org/apache/iotdb/it/env/DataNodeWrapper.java
index 0bd1c2ffb0..87779bd2be 100644
--- a/integration-test/src/main/java/org/apache/iotdb/it/env/DataNode.java
+++
b/integration-test/src/main/java/org/apache/iotdb/it/env/DataNodeWrapper.java
@@ -23,7 +23,7 @@ import org.apache.commons.lang3.SystemUtils;
import java.io.File;
import java.util.Properties;
-public class DataNode extends ClusterNodeBase {
+public class DataNodeWrapper extends AbstractNodeWrapper {
private final String targetConfigNode;
@@ -33,7 +33,7 @@ public class DataNode extends ClusterNodeBase {
private final int schemaRegionConsensusPort;
private final int[] portList;
- public DataNode(String targetConfigNode, String testName) {
+ public DataNodeWrapper(String targetConfigNode, String testName) {
super(testName);
this.targetConfigNode = targetConfigNode;
portList = super.searchAvailablePorts();
@@ -55,7 +55,9 @@ public class DataNode extends ClusterNodeBase {
properties.setProperty(
"schema_region_consensus_port",
String.valueOf(this.schemaRegionConsensusPort));
properties.setProperty("connection_timeout_ms", "30000");
- properties.setProperty("config_nodes", this.targetConfigNode);
+ if (this.targetConfigNode != null) {
+ properties.setProperty("config_nodes", this.targetConfigNode);
+ }
}
@Override
diff --git
a/integration-test/src/main/java/org/apache/iotdb/it/env/EnvFactory.java
b/integration-test/src/main/java/org/apache/iotdb/it/env/EnvFactory.java
index d9719c4a7f..0b065f3286 100644
--- a/integration-test/src/main/java/org/apache/iotdb/it/env/EnvFactory.java
+++ b/integration-test/src/main/java/org/apache/iotdb/it/env/EnvFactory.java
@@ -37,12 +37,15 @@ public class EnvFactory {
case "Standalone":
env = (BaseEnv)
Class.forName("org.apache.iotdb.db.it.env.StandaloneEnv").newInstance();
break;
- case "Remote":
- env = new RemoteServerEnv();
+ case "LocalStandaloneOnMpp":
+ env = new StandaloneOnMppEnv();
break;
case "Cluster1":
env = new Cluster1Env();
break;
+ case "Remote":
+ env = new RemoteServerEnv();
+ break;
default:
throw new ClassNotFoundException("The Property class of TestEnv
not found");
}
diff --git
a/integration-test/src/main/java/org/apache/iotdb/it/env/ClusterEnvConfig.java
b/integration-test/src/main/java/org/apache/iotdb/it/env/MppConfig.java
similarity index 93%
rename from
integration-test/src/main/java/org/apache/iotdb/it/env/ClusterEnvConfig.java
rename to integration-test/src/main/java/org/apache/iotdb/it/env/MppConfig.java
index 7ab42c57e1..7d10461723 100644
---
a/integration-test/src/main/java/org/apache/iotdb/it/env/ClusterEnvConfig.java
+++ b/integration-test/src/main/java/org/apache/iotdb/it/env/MppConfig.java
@@ -22,19 +22,19 @@ import org.apache.iotdb.itbase.env.BaseConfig;
import java.util.Properties;
-public class ClusterEnvConfig implements BaseConfig {
+public class MppConfig implements BaseConfig {
private final Properties engineProperties;
- private final Properties clusterProperties;
+ private final Properties confignodeProperties;
- public ClusterEnvConfig() {
+ public MppConfig() {
engineProperties = new Properties();
- clusterProperties = new Properties();
+ confignodeProperties = new Properties();
}
@Override
public void clearAllProperties() {
engineProperties.clear();
- clusterProperties.clear();
+ confignodeProperties.clear();
}
@Override
@@ -43,8 +43,8 @@ public class ClusterEnvConfig implements BaseConfig {
}
@Override
- public Properties getClusterProperties() {
- return this.clusterProperties;
+ public Properties getConfignodeProperties() {
+ return this.confignodeProperties;
}
@Override
@@ -175,7 +175,7 @@ public class ClusterEnvConfig implements BaseConfig {
@Override
public BaseConfig setAutoCreateSchemaEnabled(boolean enableAutoCreateSchema)
{
- clusterProperties.setProperty(
+ engineProperties.setProperty(
"enable_auto_create_schema", String.valueOf(enableAutoCreateSchema));
return this;
}
@@ -191,9 +191,4 @@ public class ClusterEnvConfig implements BaseConfig {
engineProperties.setProperty("primitive_array_size",
String.valueOf(primitiveArraySize));
return this;
}
-
- @Override
- public String getFlushCommand() {
- return "flush on cluster";
- }
}
diff --git
a/integration-test/src/main/java/org/apache/iotdb/it/env/RemoteEnvConfig.java
b/integration-test/src/main/java/org/apache/iotdb/it/env/RemoteServerConfig.java
similarity index 93%
rename from
integration-test/src/main/java/org/apache/iotdb/it/env/RemoteEnvConfig.java
rename to
integration-test/src/main/java/org/apache/iotdb/it/env/RemoteServerConfig.java
index e8dc696c4b..cfc3e58b28 100644
---
a/integration-test/src/main/java/org/apache/iotdb/it/env/RemoteEnvConfig.java
+++
b/integration-test/src/main/java/org/apache/iotdb/it/env/RemoteServerConfig.java
@@ -20,4 +20,4 @@ package org.apache.iotdb.it.env;
import org.apache.iotdb.itbase.env.BaseConfig;
-public class RemoteEnvConfig implements BaseConfig {}
+public class RemoteServerConfig implements BaseConfig {}
diff --git
a/integration-test/src/main/java/org/apache/iotdb/it/env/Cluster1Env.java
b/integration-test/src/main/java/org/apache/iotdb/it/env/StandaloneDataNodeWrapper.java
similarity index 54%
copy from
integration-test/src/main/java/org/apache/iotdb/it/env/Cluster1Env.java
copy to
integration-test/src/main/java/org/apache/iotdb/it/env/StandaloneDataNodeWrapper.java
index 74029997c5..21ab80b13f 100644
--- a/integration-test/src/main/java/org/apache/iotdb/it/env/Cluster1Env.java
+++
b/integration-test/src/main/java/org/apache/iotdb/it/env/StandaloneDataNodeWrapper.java
@@ -18,21 +18,31 @@
*/
package org.apache.iotdb.it.env;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
+import org.apache.commons.lang3.SystemUtils;
-public class Cluster1Env extends ClusterEnvBase {
- private static final Logger logger =
LoggerFactory.getLogger(Cluster1Env.class);
+import java.io.File;
+
+public class StandaloneDataNodeWrapper extends DataNodeWrapper {
+
+ public StandaloneDataNodeWrapper(String targetConfigNode, String testName) {
+ super(targetConfigNode, testName);
+ }
@Override
- public void initBeforeClass() throws InterruptedException {
- logger.debug("=======start init class=======");
- super.initEnvironment(1, 3);
+ protected String getStartScriptPath() {
+ String scriptName = "start-new-server.sh";
+ if (SystemUtils.IS_OS_WINDOWS) {
+ scriptName = "start-new-server.bat";
+ }
+ return workDirFilePath("datanode" + File.separator + "sbin", scriptName);
}
@Override
- public void initBeforeTest() throws InterruptedException {
- logger.debug("=======start init test=======");
- super.initEnvironment(1, 3);
+ protected String getStopScriptPath() {
+ String scriptName = "stop-server.sh";
+ if (SystemUtils.IS_OS_WINDOWS) {
+ scriptName = "stop-server.bat";
+ }
+ return workDirFilePath("datanode" + File.separator + "sbin", scriptName);
}
}
diff --git
a/integration-test/src/main/java/org/apache/iotdb/it/env/StandaloneOnMppEnv.java
b/integration-test/src/main/java/org/apache/iotdb/it/env/StandaloneOnMppEnv.java
new file mode 100644
index 0000000000..0d7e0fad35
--- /dev/null
+++
b/integration-test/src/main/java/org/apache/iotdb/it/env/StandaloneOnMppEnv.java
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.iotdb.it.env;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.util.ArrayList;
+
+public class StandaloneOnMppEnv extends AbstractEnv {
+
+ private static final Logger logger =
LoggerFactory.getLogger(StandaloneOnMppEnv.class);
+
+ private void initEnvironment() throws InterruptedException {
+ super.dataNodeWrapperList = new ArrayList<>();
+ final String testName = super.getTestClassName() +
super.getNextTestCaseString();
+ DataNodeWrapper dataNodeWrapper = new StandaloneDataNodeWrapper(null,
testName);
+ dataNodeWrapper.createDir();
+
dataNodeWrapper.changeConfig(ConfigFactory.getConfig().getEngineProperties());
+ dataNodeWrapper.start();
+ super.dataNodeWrapperList.add(dataNodeWrapper);
+ logger.info("In test " + testName + " DataNode " + dataNodeWrapper.getId()
+ " started.");
+ super.testWorking();
+ }
+
+ @Override
+ public void initBeforeClass() throws InterruptedException {
+ logger.debug("=======start init class=======");
+ initEnvironment();
+ }
+
+ @Override
+ public void initBeforeTest() throws InterruptedException {
+ logger.debug("=======start init test=======");
+ initEnvironment();
+ }
+
+ private void cleanupEnvironment() {
+ for (DataNodeWrapper dataNodeWrapper : this.dataNodeWrapperList) {
+ dataNodeWrapper.stop();
+ dataNodeWrapper.waitingToShutDown();
+ dataNodeWrapper.destroyDir();
+ }
+ super.nextTestCase = null;
+ }
+
+ @Override
+ public void cleanAfterClass() {
+ cleanupEnvironment();
+ }
+
+ @Override
+ public void cleanAfterTest() {
+ cleanupEnvironment();
+ }
+}
diff --git
a/integration-test/src/main/java/org/apache/iotdb/itbase/env/BaseConfig.java
b/integration-test/src/main/java/org/apache/iotdb/itbase/env/BaseConfig.java
index 6d35f50993..aa8f888f82 100644
--- a/integration-test/src/main/java/org/apache/iotdb/itbase/env/BaseConfig.java
+++ b/integration-test/src/main/java/org/apache/iotdb/itbase/env/BaseConfig.java
@@ -30,8 +30,8 @@ public interface BaseConfig {
throw new UnsupportedOperationException("Method getEngineProperties not
implement");
}
- default Properties getClusterProperties() throws
UnsupportedOperationException {
- throw new UnsupportedOperationException("Method getClusterProperties not
implement");
+ default Properties getConfignodeProperties() throws
UnsupportedOperationException {
+ throw new UnsupportedOperationException("Method getConfignodeProperties
not implement");
}
default BaseConfig setMaxNumberOfPointsInPage(int maxNumberOfPointsInPage) {
@@ -149,8 +149,4 @@ public interface BaseConfig {
default int getPrimitiveArraySize() {
return 32;
}
-
- default String getFlushCommand() {
- return "flush";
- }
}
diff --git
a/integration-test/src/main/java/org/apache/iotdb/itbase/env/BaseNode.java
b/integration-test/src/main/java/org/apache/iotdb/itbase/env/BaseNodeWrapper.java
similarity index 96%
rename from
integration-test/src/main/java/org/apache/iotdb/itbase/env/BaseNode.java
rename to
integration-test/src/main/java/org/apache/iotdb/itbase/env/BaseNodeWrapper.java
index 74d7d66812..ecb2e1fc05 100644
--- a/integration-test/src/main/java/org/apache/iotdb/itbase/env/BaseNode.java
+++
b/integration-test/src/main/java/org/apache/iotdb/itbase/env/BaseNodeWrapper.java
@@ -20,7 +20,7 @@ package org.apache.iotdb.itbase.env;
import java.util.Properties;
-public interface BaseNode {
+public interface BaseNodeWrapper {
void createDir();
diff --git a/integration-test/src/script/append-to-env.sh
b/integration-test/src/script/append-to-env.sh
new file mode 100644
index 0000000000..3192433d13
--- /dev/null
+++ b/integration-test/src/script/append-to-env.sh
@@ -0,0 +1,32 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+if [ "$(uname)" == "Darwin" ]
+then
+ sed -i '' "s/^#MAX_HEAP_SIZE=.*/MAX_HEAP_SIZE=\"200m\"/"
target/template-node/datanode/conf/iotdb-env.sh
+ sed -i '' "s/^#HEAP_NEWSIZE=.*/HEAP_NEWSIZE=\"200m\"/"
target/template-node/datanode/conf/iotdb-env.sh
+ sed -i '' "s/^#MAX_HEAP_SIZE=.*/MAX_HEAP_SIZE=\"200m\"/"
target/template-node/confignode/conf/confignode-env.sh
+ sed -i '' "s/^#HEAP_NEWSIZE=.*/HEAP_NEWSIZE=\"200m\"/"
target/template-node/confignode/conf/confignode-env.sh
+else
+ sed -i "s/^#MAX_HEAP_SIZE=.*/MAX_HEAP_SIZE=\"200m\"/"
target/template-node/datanode/conf/iotdb-env.sh
+ sed -i "s/^#HEAP_NEWSIZE=.*/HEAP_NEWSIZE=\"200m\"/"
target/template-node/datanode/conf/iotdb-env.sh
+ sed -i "s/^#MAX_HEAP_SIZE=.*/MAX_HEAP_SIZE=\"200m\"/"
target/template-node/confignode/conf/confignode-env.sh
+ sed -i "s/^#HEAP_NEWSIZE=.*/HEAP_NEWSIZE=\"200m\"/"
target/template-node/confignode/conf/confignode-env.sh
+fi
+
diff --git
a/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBExampleIT.java
b/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBExampleIT.java
index dd4176003b..07ea85c194 100644
--- a/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBExampleIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBExampleIT.java
@@ -41,12 +41,12 @@ import java.sql.Statement;
public class IoTDBExampleIT {
@BeforeClass
public static void setUp() throws Exception {
- EnvFactory.getEnv().initBeforeTest();
+ EnvFactory.getEnv().initBeforeClass();
}
@AfterClass
public static void tearDown() throws Exception {
- EnvFactory.getEnv().cleanAfterTest();
+ EnvFactory.getEnv().cleanAfterClass();
}
@Test
diff --git
a/integration-test/src/test/java/org/apache/iotdb/db/it/aligned/AlignedWriteUtil.java
b/integration-test/src/test/java/org/apache/iotdb/db/it/aligned/AlignedWriteUtil.java
index ada373a1df..4b7b73e2fe 100644
---
a/integration-test/src/test/java/org/apache/iotdb/db/it/aligned/AlignedWriteUtil.java
+++
b/integration-test/src/test/java/org/apache/iotdb/db/it/aligned/AlignedWriteUtil.java
@@ -18,7 +18,6 @@
*/
package org.apache.iotdb.db.it.aligned;
-import org.apache.iotdb.it.env.ConfigFactory;
import org.apache.iotdb.it.env.EnvFactory;
import java.sql.Connection;
@@ -64,7 +63,7 @@ public class AlignedWriteUtil {
"insert into root.sg1.d2(time, s1, s2, s3, s5) values(8, 8.0, 8, 8,
'non_aligned_test8')",
"insert into root.sg1.d2(time, s1, s2, s3, s4, s5) values(9, 9.0, 9,
9, FALSE, 'non_aligned_test9')",
"insert into root.sg1.d2(time, s2, s3, s4, s5) values(10, 10, 10,
TRUE, 'non_aligned_test10')",
- ConfigFactory.getConfig().getFlushCommand(),
+ "flush",
"insert into root.sg1.d1(time, s1, s3, s4, s5) aligned values(3,
30000.0, 30000, TRUE, 'aligned_unseq_test3')",
"insert into root.sg1.d1(time, s1, s2, s3) aligned values(11, 11.0,
11, 11)",
"insert into root.sg1.d1(time, s1, s2, s3) aligned values(12, 12.0,
12, 12)",
@@ -86,7 +85,7 @@ public class AlignedWriteUtil {
"insert into root.sg1.d2(time, s1, s2, s3) values(18, 18.0, 18, 18)",
"insert into root.sg1.d2(time, s1, s2, s3) values(19, 19.0, 19, 19)",
"insert into root.sg1.d2(time, s1, s2, s3) values(20, 20.0, 20, 20)",
- ConfigFactory.getConfig().getFlushCommand(),
+ "flush",
"insert into root.sg1.d1(time, s1, s2, s3, s4, s5) aligned values(13,
130000.0, 130000, 130000, TRUE, 'aligned_unseq_test13')",
"insert into root.sg1.d1(time, s3, s4) aligned values(21, 21, TRUE)",
"insert into root.sg1.d1(time, s3, s4) aligned values(22, 22, TRUE)",
@@ -108,7 +107,7 @@ public class AlignedWriteUtil {
"insert into root.sg1.d2(time, s3, s4) values(28, 28, FALSE)",
"insert into root.sg1.d2(time, s3, s4) values(29, 29, FALSE)",
"insert into root.sg1.d2(time, s3, s4) values(30, 30, FALSE)",
- ConfigFactory.getConfig().getFlushCommand(),
+ "flush",
"insert into root.sg1.d1(time, s1, s3, s4) aligned values(23,
230000.0, 230000, FALSE)",
"insert into root.sg1.d1(time, s2, s5) aligned values(31, 31,
'aligned_test31')",
"insert into root.sg1.d1(time, s2, s5) aligned values(32, 32,
'aligned_test32')",
diff --git
a/integration-test/src/test/java/org/apache/iotdb/db/it/aligned/IoTDBInsertAlignedValues2IT.java
b/integration-test/src/test/java/org/apache/iotdb/db/it/aligned/IoTDBInsertAlignedValues2IT.java
index c480eca06c..6cce8a57f9 100644
---
a/integration-test/src/test/java/org/apache/iotdb/db/it/aligned/IoTDBInsertAlignedValues2IT.java
+++
b/integration-test/src/test/java/org/apache/iotdb/db/it/aligned/IoTDBInsertAlignedValues2IT.java
@@ -88,7 +88,7 @@ public class IoTDBInsertAlignedValues2IT {
}
}
- statement.execute(ConfigFactory.getConfig().getFlushCommand());
+ statement.execute("flush");
int rowCount = 0;
try (ResultSet resultSet = statement.executeQuery("select S3 from
root.lz.dev.GPS")) {
while (resultSet.next()) {
diff --git
a/integration-test/src/test/java/org/apache/iotdb/db/it/aligned/IoTDBInsertAlignedValues3IT.java
b/integration-test/src/test/java/org/apache/iotdb/db/it/aligned/IoTDBInsertAlignedValues3IT.java
index 51e764ee98..37db7e902d 100644
---
a/integration-test/src/test/java/org/apache/iotdb/db/it/aligned/IoTDBInsertAlignedValues3IT.java
+++
b/integration-test/src/test/java/org/apache/iotdb/db/it/aligned/IoTDBInsertAlignedValues3IT.java
@@ -89,7 +89,7 @@ public class IoTDBInsertAlignedValues3IT {
+ ")");
}
}
- statement.execute(ConfigFactory.getConfig().getFlushCommand());
+ statement.execute("flush");
int rowCount = 0;
try (ResultSet resultSet = statement.executeQuery("select S3 from
root.lz.dev.GPS")) {
while (resultSet.next()) {
diff --git
a/integration-test/src/test/java/org/apache/iotdb/db/it/aligned/IoTDBInsertAlignedValues4IT.java
b/integration-test/src/test/java/org/apache/iotdb/db/it/aligned/IoTDBInsertAlignedValues4IT.java
index 28b9dab516..005a8d8f93 100644
---
a/integration-test/src/test/java/org/apache/iotdb/db/it/aligned/IoTDBInsertAlignedValues4IT.java
+++
b/integration-test/src/test/java/org/apache/iotdb/db/it/aligned/IoTDBInsertAlignedValues4IT.java
@@ -69,7 +69,7 @@ public class IoTDBInsertAlignedValues4IT {
statement.execute("insert into root.sg.d1(time,s1,s2) aligned
values(4,'test','test')");
statement.execute("insert into root.sg.d1(time,s1,s3) aligned
values(5,'test','test')");
statement.execute("insert into root.sg.d1(time,s1,s2) aligned
values(6,'test','test')");
- statement.execute(ConfigFactory.getConfig().getFlushCommand());
+ statement.execute("flush");
statement.execute("insert into root.sg.d1(time,s1,s3) aligned
values(7,'test','test')");
} catch (SQLException e) {
fail();
diff --git
a/integration-test/src/test/java/org/apache/iotdb/db/it/aligned/IoTDBInsertAlignedValuesIT.java
b/integration-test/src/test/java/org/apache/iotdb/db/it/aligned/IoTDBInsertAlignedValuesIT.java
index 057523e335..4d3b1cac8b 100644
---
a/integration-test/src/test/java/org/apache/iotdb/db/it/aligned/IoTDBInsertAlignedValuesIT.java
+++
b/integration-test/src/test/java/org/apache/iotdb/db/it/aligned/IoTDBInsertAlignedValuesIT.java
@@ -190,7 +190,7 @@ public class IoTDBInsertAlignedValuesIT {
assertFalse(resultSet.next());
}
- statement.execute(ConfigFactory.getConfig().getFlushCommand());
+ statement.execute("flush");
try (ResultSet resultSet = statement.executeQuery("select status from
root.t1.wf01.wt01")) {
assertTrue(resultSet.next());
assertTrue(resultSet.getBoolean(2));
diff --git
a/integration-test/src/test/java/org/apache/iotdb/db/it/udf/IoTDBUDTFBuiltinFunctionIT.java
b/integration-test/src/test/java/org/apache/iotdb/db/it/udf/IoTDBUDTFBuiltinFunctionIT.java
index b2885d58dc..d838f43ee8 100644
---
a/integration-test/src/test/java/org/apache/iotdb/db/it/udf/IoTDBUDTFBuiltinFunctionIT.java
+++
b/integration-test/src/test/java/org/apache/iotdb/db/it/udf/IoTDBUDTFBuiltinFunctionIT.java
@@ -25,6 +25,7 @@ import org.apache.iotdb.itbase.category.LocalStandaloneIT;
import org.junit.AfterClass;
import org.junit.BeforeClass;
+import org.junit.Ignore;
import org.junit.Test;
import org.junit.experimental.categories.Category;
import org.junit.runner.RunWith;
@@ -258,6 +259,8 @@ public class IoTDBUDTFBuiltinFunctionIT {
}
}
+ // TODO remove @Ignore while completely supporting udf in
LocalStandaloneOnMpp
+ @Ignore
@Test
public void testConstantTimeSeriesGeneratingFunctions() {
String[] expected = {
@@ -910,6 +913,8 @@ public class IoTDBUDTFBuiltinFunctionIT {
}
}
+ // TODO remove @Ignore while completely supporting udf in
LocalStandaloneOnMpp
+ @Ignore
@Test
public void testUDTFJexl() {
try (Connection connection = EnvFactory.getEnv().getConnection();
@@ -1040,6 +1045,8 @@ public class IoTDBUDTFBuiltinFunctionIT {
}
}
+ // TODO remove @Ignore while completely supporting udf in
LocalStandaloneOnMpp
+ @Ignore
@Test
public void testStringFunctions() {
String[] createSqls =