You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/07/27 04:14:50 UTC

[GitHub] [shardingsphere] terrymanu commented on a diff in pull request #19582: Try fix sporadic exception in cluster mode

terrymanu commented on code in PR #19582:
URL: https://github.com/apache/shardingsphere/pull/19582#discussion_r930603540


##########
shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/ddl/BaseDDLIT.java:
##########
@@ -59,6 +61,14 @@ public final void init() throws Exception {
         try (Connection connection = getTargetDataSource().getConnection()) {
             executeInitSQLs(connection);
         }
+        intervalTime();
+    }
+    
+    @SneakyThrows(InterruptedException.class)
+    private void intervalTime() {

Review Comment:
   the method name is not clear, method name should be Verb + Nouns



##########
shardingsphere-test/shardingsphere-integration-test/shardingsphere-integration-test-suite/src/test/java/org/apache/shardingsphere/test/integration/engine/ddl/BaseDDLIT.java:
##########
@@ -59,6 +61,14 @@ public final void init() throws Exception {
         try (Connection connection = getTargetDataSource().getConnection()) {
             executeInitSQLs(connection);
         }
+        intervalTime();
+    }
+    
+    @SneakyThrows(InterruptedException.class)
+    private void intervalTime() {
+        if ("Cluster".equalsIgnoreCase(getMode())) {
+            TimeUnit.MILLISECONDS.sleep(200);

Review Comment:
   long value should use `L`, please change it to `200L`



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org