You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by er...@apache.org on 2022/11/02 04:12:37 UTC

[iotdb] 01/01: Rename and simplify cluster IT actions

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

ericpai pushed a commit to branch improve/rename-ci
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit eb8d84651525cf0e6512669f276bc07d6aa07962
Author: ericpai <er...@hotmail.com>
AuthorDate: Wed Nov 2 12:12:20 2022 +0800

    Rename and simplify cluster IT actions
---
 .github/workflows/cluster-it-1c1d.yml                     |  2 +-
 .github/workflows/cluster-it-1c3d.yml                     |  7 ++-----
 integration-test/README.md                                | 15 +++------------
 .../java/org/apache/iotdb/it/env/AbstractNodeWrapper.java |  8 +++++---
 4 files changed, 11 insertions(+), 21 deletions(-)

diff --git a/.github/workflows/cluster-it-1c1d.yml b/.github/workflows/cluster-it-1c1d.yml
index 9b566ad2ef..ce8a52cdee 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:
diff --git a/.github/workflows/cluster-it-1c3d.yml b/.github/workflows/cluster-it-1c3d.yml
index 18a88b9441..1f9e2b462a 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:
+  OneCopy:
     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/integration-test/README.md b/integration-test/README.md
index f0bec7cd0a..b2b87be38d 100644
--- a/integration-test/README.md
+++ b/integration-test/README.md
@@ -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...  
-  ![Run(Menu)](https://github.com/apache/iotdb-bin-resources/blob/main/integration-test/pic/Run(Menu).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  
-  ![Add New Configuration](https://github.com/apache/iotdb-bin-resources/blob/main/integration-test/pic/Add_New_Configuration.png?raw=true)
-
-
-- Step 3. Input some fields as the following picture  
-  ![OneCopy Category](https://github.com/apache/iotdb-bin-resources/blob/main/integration-test/pic/OneCopy_Category.png?raw=true)
+[OneCopy Run](https://github.com/apache/iotdb-bin-resources/blob/main/integration-test/pic/OneCopy_Category.png?raw=true)
 
 ## Integration Testing with Cluster Mode
 
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.");
   }