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

duanzhengqiang 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 5df14e707e2 Add sleep to reslove network problem (#21214)
5df14e707e2 is described below

commit 5df14e707e290e482878f11786ef402024e317ed
Author: zhaojinchao <[email protected]>
AuthorDate: Tue Sep 27 14:52:35 2022 +0800

    Add sleep to reslove network problem (#21214)
    
    * Add sleep to reslove network problem
    
    * Modify
    
    * Fix checkstyle
    
    * Format
    
    * Revise
---
 .../shardingsphere/test/integration/engine/rdl/BaseRDLIT.java  | 10 ++++++++++
 .../test/integration/engine/rdl/GeneralRDLIT.java              |  1 +
 2 files changed, 11 insertions(+)

diff --git 
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/rdl/BaseRDLIT.java
 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/rdl/BaseRDLIT.java
index 1e6800d6be5..a83ad703d9b 100644
--- 
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/rdl/BaseRDLIT.java
+++ 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/rdl/BaseRDLIT.java
@@ -34,6 +34,7 @@ import java.sql.SQLException;
 import java.util.Collection;
 import java.util.LinkedList;
 import java.util.List;
+import java.util.concurrent.TimeUnit;
 
 import static org.hamcrest.CoreMatchers.is;
 import static org.hamcrest.MatcherAssert.assertThat;
@@ -50,6 +51,7 @@ public abstract class BaseRDLIT extends SingleITCase {
         try (Connection connection = getTargetDataSource().getConnection()) {
             executeInitSQLs(connection);
         }
+        sleep();
     }
     
     @After
@@ -59,6 +61,7 @@ public abstract class BaseRDLIT extends SingleITCase {
                 executeDestroySQLs(connection);
             }
         }
+        sleep();
     }
     
     private void executeInitSQLs(final Connection connection) throws 
SQLException {
@@ -83,6 +86,13 @@ public abstract class BaseRDLIT extends SingleITCase {
         }
     }
     
+    protected void sleep() {
+        try {
+            TimeUnit.SECONDS.sleep(2);
+        } catch (final InterruptedException ignored) {
+        }
+    }
+    
     protected final void assertResultSet(final ResultSet resultSet) throws 
SQLException {
         assertMetaData(resultSet.getMetaData(), getExpectedColumns());
         assertRows(resultSet, getDataSet().getRows());
diff --git 
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/rdl/GeneralRDLIT.java
 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/rdl/GeneralRDLIT.java
index 7ee91012c5e..06c13f59cb4 100644
--- 
a/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/rdl/GeneralRDLIT.java
+++ 
b/shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/rdl/GeneralRDLIT.java
@@ -52,6 +52,7 @@ public final class GeneralRDLIT extends BaseRDLIT {
         try (Connection connection = getTargetDataSource().getConnection()) {
             try (Statement statement = connection.createStatement()) {
                 executeSQLCase(statement);
+                sleep();
                 assertResultSet(statement);
             }
         }

Reply via email to