You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by zh...@apache.org on 2022/08/01 09:39:21 UTC

[shardingsphere] branch master updated: add opengauss transaction it (#19646)

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

zhangliang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new fd300c8c8b0 add opengauss transaction it (#19646)
fd300c8c8b0 is described below

commit fd300c8c8b0d22c7e6f46d41b60397bc4146d7ee
Author: JingShang Lu <ji...@gmail.com>
AuthorDate: Mon Aug 1 17:39:16 2022 +0800

    add opengauss transaction it (#19646)
    
    * add opengauss transaction it
    
    * Update it-transaction.yml
---
 .github/workflows/it-transaction.yml                                  | 4 ++++
 .../integration/transaction/engine/base/BaseITCase.java               | 3 ++-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/it-transaction.yml b/.github/workflows/it-transaction.yml
index 204b4bb13ff..d1b2a573b8d 100644
--- a/.github/workflows/it-transaction.yml
+++ b/.github/workflows/it-transaction.yml
@@ -26,6 +26,7 @@ on:
     branches: [ master ]
     paths:
       - '!examples/**'
+      - '.github/workflows/it-transaction.yml'
       - '!shardingsphere-test/**'
       - 'shardingsphere-test/**/pom.xml'
       - 'shardingsphere-test/shardingsphere-integration-test/**'
@@ -46,6 +47,7 @@ jobs:
     runs-on: ubuntu-latest
     env:
       postgresql_version: postgres:12-alpine
+      opengauss_version: enmotech/opengauss:2.1.0
       mysql_version: 5.7
     timeout-minutes: 60
     steps:
@@ -66,3 +68,5 @@ jobs:
         run: ./mvnw -nsu -B install -f shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/pom.xml -Dtransaction.it.env.type=docker -Dtransaction.it.docker.mysql.version=${{ env.mysql_version }}
       - name: Run Transaction PostgreSQL Integration Test
         run: ./mvnw -nsu -B install -f shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/pom.xml -Dtransaction.it.env.type=docker -Dtransaction.it.docker.postgresql.version=${{ env.postgresql_version }}
+      - name: Run Transaction OpenGauss Integration Test
+        run: ./mvnw -nsu -B install -f shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/pom.xml -Dtransaction.it.env.type=docker -Dtransaction.it.docker.opengauss.version=${{ env.opengauss_version }}
diff --git a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/java/org/apache/shardingsphere/integration/transaction/engine/base/BaseITCase.java b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/java/org/apache/shardingsphere/integration/transaction/engine/base/BaseITCase.java
index 4b84fe5b5c3..f102f4695c2 100644
--- a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/java/org/apache/shardingsphere/integration/transaction/engine/base/BaseITCase.java
+++ b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-transaction/src/test/java/org/apache/shardingsphere/integration/transaction/engine/base/BaseITCase.java
@@ -390,7 +390,7 @@ public abstract class BaseITCase {
      * 
      * @param connection connection
      */
-    @SneakyThrows(SQLException.class)
+    @SneakyThrows({SQLException.class, InterruptedException.class})
     public void addNewResource(final Connection connection) {
         String addSourceResource = commonSQLCommand.getSourceAddNewResourceTemplate()
                 .replace("${user}", ENV.getActualDataSourceUsername(databaseType))
@@ -398,6 +398,7 @@ public abstract class BaseITCase {
                 .replace("${ds2}", getActualJdbcUrlTemplate(DS_2));
         executeWithLog(connection, addSourceResource);
         int resourceCount = countWithLog("SHOW DATABASE RESOURCES FROM sharding_db");
+        Thread.sleep(5000);
         assertThat(resourceCount, is(3));
     }