This is an automated email from the ASF dual-hosted git repository.
haonan 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 bc96c312dd Rename and simplify cluster IT actions (#7873)
bc96c312dd is described below
commit bc96c312dd73a653894be3e338dadcba17ec524c
Author: BaiJian <[email protected]>
AuthorDate: Wed Nov 2 22:13:00 2022 +0800
Rename and simplify cluster IT actions (#7873)
---
.github/workflows/cluster-it-1c1d.yml | 4 +--
.github/workflows/cluster-it-1c3d.yml | 7 ++----
.github/workflows/sonar-coveralls.yml | 26 +++++++++----------
README.md | 3 +--
README_ZH.md | 3 +--
integration-test/README.md | 29 ++++++++--------------
integration-test/pom.xml | 4 +--
.../apache/iotdb/it/env/AbstractNodeWrapper.java | 8 +++---
.../org/apache/iotdb/it/env/ConfigFactory.java | 2 +-
.../java/org/apache/iotdb/it/env/EnvFactory.java | 4 +--
.../main/java/org/apache/iotdb/it/env/EnvType.java | 4 +--
.../it/env/{OneCopyEnv.java => SimpleEnv.java} | 2 +-
12 files changed, 42 insertions(+), 54 deletions(-)
diff --git a/.github/workflows/cluster-it-1c1d.yml
b/.github/workflows/cluster-it-1c1d.yml
index 9b566ad2ef..a3753c261c 100644
--- a/.github/workflows/cluster-it-1c1d.yml
+++ b/.github/workflows/cluster-it-1c1d.yml
@@ -1,4 +1,4 @@
-name: Cluster IT - OneCopy
+name: Cluster IT - 1C1D
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:
- OneCopy:
+ Simple:
strategy:
fail-fast: false
max-parallel: 20
diff --git a/.github/workflows/cluster-it-1c3d.yml
b/.github/workflows/cluster-it-1c3d.yml
index 18a88b9441..0bfd236397 100644
--- a/.github/workflows/cluster-it-1c3d.yml
+++ b/.github/workflows/cluster-it-1c3d.yml
@@ -22,16 +22,13 @@ 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:
+ Simple:
strategy:
fail-fast: false
max-parallel: 20
matrix:
java: [ 8, 11, 17 ]
- os: [ ubuntu-latest, windows-latest ]
- include:
- - java: 8
- os: macos-latest
+ os: [ ubuntu-latest ]
runs-on: ${{ matrix.os }}
steps:
diff --git a/.github/workflows/sonar-coveralls.yml
b/.github/workflows/sonar-coveralls.yml
index 8b8450789b..2a055bba76 100644
--- a/.github/workflows/sonar-coveralls.yml
+++ b/.github/workflows/sonar-coveralls.yml
@@ -46,19 +46,19 @@ jobs:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2-
- - name: IT/UT Test
- # we do not compile client-cpp for saving time, it is tested in
client.yml
- run: mvn -B clean compile post-integration-test
-Dcluster.test.skip=true -Dtest.port.closed=true -Pcode-coverage -P
'!testcontainer,!influxdb-protocol'
- - name: Code Coverage (Coveralls)
- if: ${{ success() }}
- run: |
- mvn -B post-integration-test -Pcode-coverage -pl code-coverage
- mvn -B coveralls:report \
- -DserviceName=travis_ci \
- -Dbranch=$BRANCH_NAME \
- -DpullRequest=$PR_NUMBER \
- -DrepoToken=${{ secrets.COVERALL_TOKEN }} \
- -Pcode-coverage -P '!testcontainer'
+# - name: IT/UT Test
+# # we do not compile client-cpp for saving time, it is tested in
client.yml
+# run: mvn -B clean compile post-integration-test
-Dcluster.test.skip=true -Dtest.port.closed=true -Pcode-coverage -P
'!testcontainer,!influxdb-protocol'
+# - name: Code Coverage (Coveralls)
+# if: ${{ success() }}
+# run: |
+# mvn -B post-integration-test -Pcode-coverage -pl code-coverage
+# mvn -B coveralls:report \
+# -DserviceName=travis_ci \
+# -Dbranch=$BRANCH_NAME \
+# -DpullRequest=$PR_NUMBER \
+# -DrepoToken=${{ secrets.COVERALL_TOKEN }} \
+# -Pcode-coverage -P '!testcontainer'
- name: SonarCloud Report
if: ${{ success() }}
env:
diff --git a/README.md b/README.md
index be30ca1f39..1a3cfde622 100644
--- a/README.md
+++ b/README.md
@@ -22,8 +22,7 @@
# IoTDB
[](https://github.com/apache/iotdb/actions/workflows/main-unix.yml)
-[](https://github.com/apache/iotdb/actions/workflows/main-win.yml)
-[](https://coveralls.io/repos/github/apache/iotdb/badge.svg?branch=master)
+[](https://github.com/apache/iotdb/actions/workflows/main-win.yml)<!--[](https://coveralls.io/repos/github/apache/iotdb/badge.svg?branch=master)-->
[](https://github.com/apache/iotdb/releases)
[](https://www.apache.org/licenses/LICENSE-2.0.html)

diff --git a/README_ZH.md b/README_ZH.md
index 46d62940b0..5987a528a7 100644
--- a/README_ZH.md
+++ b/README_ZH.md
@@ -22,8 +22,7 @@
# IoTDB
[](https://github.com/apache/iotdb/actions/workflows/main-unix.yml)
-[](https://github.com/apache/iotdb/actions/workflows/main-win.yml)
-[](https://coveralls.io/repos/github/apache/iotdb/badge.svg?branch=master)
+[](https://github.com/apache/iotdb/actions/workflows/main-win.yml)<!--[](https://coveralls.io/repos/github/apache/iotdb/badge.svg?branch=master)-->
[](https://github.com/apache/iotdb/releases)
[](https://www.apache.org/licenses/LICENSE-2.0.html)

diff --git a/integration-test/README.md b/integration-test/README.md
index f0bec7cd0a..af67714882 100644
--- a/integration-test/README.md
+++ b/integration-test/README.md
@@ -25,12 +25,12 @@ Integration tests for IoTDB are in this module.
Now integration testing supports two kinds of architecture.
-- `OneCopy`: A cluster with 1 config node and 1 data node.
+- `Simple`: A cluster with 1 config node and 1 data node.
- `Cluster1`: A cluster with 1 config node and 3 data nodes.
## Integration Testing with One Copy Mode
-Integration testing in `OneCopy` mode can be run with both maven and IDEs like
IntelliJ easily.
+Integration testing in `Simple` mode can be run with both maven and IDEs like
IntelliJ easily.
The maven command is:
```
@@ -39,24 +39,15 @@ mvn clean verify -DskipUTs -pl integration-test -am
Notice that, this above maven command only run IT.
-And if you want to run IT in the IDE like IntelliJ, you need to achieve the
effect as the `OneCopyIT` profile in maven, which has already been set by
default. Follow Steps 1-4 to achieve it.
+And if you want to run IT in the IDE like IntelliJ, when you run the test for
the first time, or when you change the code of the module that the integration
test module depends on, you may need to use the following command to generate
`integration-test/target/template-node` for the node to be tested.
-- Step 0. Optionally, when you run the test for the first time, or when you
change the code of the module that the integration test module depends on, you
may need to use the following command to generate
`integration-test/target/template-node` for the node to be tested.
-
```
mvn clean package -DskipTests -pl integration-test -am
```
-- Step 1. Run(Menu) -> Edit Configurations...
-
.png?raw=true)
-
+After doing this, you can run any one just by clicking the test case and
pressing `Run`, like running normal cases :).
-- Step 2. Add New Configuration -> JUnit
- 
-
-
-- Step 3. Input some fields as the following picture
- 
+
## Integration Testing with Cluster Mode
@@ -68,15 +59,15 @@ The maven command is:
mvn clean verify -DskipUTs -pl integration-test -am -PClusterIT
```
-If you want to run IT in `Cluster1` mode in the IDE like IntelliJ, you need to
achieve the effect as the `ClusterIT` profile in maven explicitly. Follow Steps
1-4 to achieve it, which are almost the same as `OneCopy`.
+If you want to run IT in `Cluster1` mode in the IDE like IntelliJ, you need to
achieve the effect as the `ClusterIT` profile in maven explicitly. Follow Steps
1-4 to achieve it.
- Step 0. Optionally, when you run the test for the first time, or when you
change the code of the module that the integration test module depends on, you
may need to use the following command to generate
`integration-test/target/template-node` for nodes of the pseudo cluster.
- It has the same effect as step 0 of the `OneCopy` counterpart; these two
commands' generations are the same content.
-```
-mvn clean package -DskipTests -pl integration-test
-```
+ It has the same effect as the `Simple` counterpart; these two commands'
generations are the same content.
+ ```
+ mvn clean package -DskipTests -pl integration-test
+ ```
- Step 1. Run(Menu) -> Edit Configurations...
.png?raw=true)
diff --git a/integration-test/pom.xml b/integration-test/pom.xml
index a01c5c288d..fe584dc2a5 100644
--- a/integration-test/pom.xml
+++ b/integration-test/pom.xml
@@ -209,11 +209,11 @@
</build>
<profiles>
<profile>
- <id>OneCopyIT</id>
+ <id>SimpleIT</id>
<properties>
<integrationTest.includedGroups>org.apache.iotdb.itbase.category.LocalStandaloneIT</integrationTest.includedGroups>
<integrationTest.excludedGroups/>
- <integrationTest.testEnv>OneCopy</integrationTest.testEnv>
+ <integrationTest.testEnv>Simple</integrationTest.testEnv>
<integrationTest.launchNodeInSameJVM>false</integrationTest.launchNodeInSameJVM>
<integrationTest.randomSelectWriteNode>false</integrationTest.randomSelectWriteNode>
<integrationTest.readAndVerifyWithMultiNode>false</integrationTest.readAndVerifyWithMultiNode>
diff --git
a/integration-test/src/main/java/org/apache/iotdb/it/env/AbstractNodeWrapper.java
b/integration-test/src/main/java/org/apache/iotdb/it/env/AbstractNodeWrapper.java
index 988d4429d8..561cfe20fe 100644
---
a/integration-test/src/main/java/org/apache/iotdb/it/env/AbstractNodeWrapper.java
+++
b/integration-test/src/main/java/org/apache/iotdb/it/env/AbstractNodeWrapper.java
@@ -135,21 +135,23 @@ public abstract class AbstractNodeWrapper implements
BaseNodeWrapper {
@Override
public void destroyDir() {
- for (int i = 0; i < 3; i++) {
+ Exception lastException = null;
+ for (int i = 0; i < 10; i++) {
try {
// DO NOT use FileUtils.forceDelete, as it will follow the symbolic
link to make libs
// read-only, which causes permission denied in deletion.
PathUtils.deleteDirectory(Paths.get(getNodePath()));
return;
} catch (IOException ex) {
- logger.warn("Delete node dir failed. RetryTimes={}", i + 1, ex);
+ lastException = ex;
try {
- TimeUnit.SECONDS.sleep(3);
+ TimeUnit.SECONDS.sleep(1);
} catch (InterruptedException e) {
fail("Delete node dir failed. " + e);
}
}
}
+ lastException.printStackTrace();
fail("Delete node dir failed.");
}
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 639a963dff..5a2eb738ed 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
@@ -27,7 +27,7 @@ public class ConfigFactory {
if (config == null) {
EnvType env = EnvType.getSystemEnvType();
switch (env) {
- case OneCopy:
+ case Simple:
case Cluster1:
config = new MppConfig();
break;
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 b275ce7440..f6cde01716 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
@@ -35,8 +35,8 @@ public class EnvFactory {
logger.debug(">>>>>>>" + System.getProperty("TestEnv"));
EnvType envType = EnvType.getSystemEnvType();
switch (envType) {
- case OneCopy:
- env = new OneCopyEnv();
+ case Simple:
+ env = new SimpleEnv();
break;
case Cluster1:
env = new Cluster1Env();
diff --git
a/integration-test/src/main/java/org/apache/iotdb/it/env/EnvType.java
b/integration-test/src/main/java/org/apache/iotdb/it/env/EnvType.java
index e88d958069..d298a185c3 100644
--- a/integration-test/src/main/java/org/apache/iotdb/it/env/EnvType.java
+++ b/integration-test/src/main/java/org/apache/iotdb/it/env/EnvType.java
@@ -20,11 +20,11 @@ package org.apache.iotdb.it.env;
public enum EnvType {
Remote,
- OneCopy,
+ Simple,
Cluster1;
public static EnvType getSystemEnvType() {
- String envValue = System.getProperty("TestEnv", OneCopy.name());
+ String envValue = System.getProperty("TestEnv", Simple.name());
return EnvType.valueOf(envValue);
}
}
diff --git
a/integration-test/src/main/java/org/apache/iotdb/it/env/OneCopyEnv.java
b/integration-test/src/main/java/org/apache/iotdb/it/env/SimpleEnv.java
similarity index 96%
rename from
integration-test/src/main/java/org/apache/iotdb/it/env/OneCopyEnv.java
rename to integration-test/src/main/java/org/apache/iotdb/it/env/SimpleEnv.java
index bf438ce882..df64a56a52 100644
--- a/integration-test/src/main/java/org/apache/iotdb/it/env/OneCopyEnv.java
+++ b/integration-test/src/main/java/org/apache/iotdb/it/env/SimpleEnv.java
@@ -22,7 +22,7 @@ import org.apache.iotdb.it.framework.IoTDBTestLogger;
import org.slf4j.Logger;
-public class OneCopyEnv extends AbstractEnv {
+public class SimpleEnv extends AbstractEnv {
private static final Logger logger = IoTDBTestLogger.logger;