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

rong 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 c662a3e  [IOTDB-1821][IOTDB-1825] IT fails on IoTDBTriggerExecutionIT 
& IoTDBContinuousQueryIT caused by connection broken (#4143)
c662a3e is described below

commit c662a3e86de46aecc56236f0c2b693a2c479f38d
Author: Steve Yurong Su <[email protected]>
AuthorDate: Wed Oct 13 19:50:37 2021 +0800

    [IOTDB-1821][IOTDB-1825] IT fails on IoTDBTriggerExecutionIT & 
IoTDBContinuousQueryIT caused by connection broken (#4143)
---
 .../db/integration/IoTDBContinuousQueryIT.java     | 19 +++++-------------
 .../db/integration/IoTDBTriggerExecutionIT.java    | 23 ++++------------------
 2 files changed, 9 insertions(+), 33 deletions(-)

diff --git 
a/server/src/test/java/org/apache/iotdb/db/integration/IoTDBContinuousQueryIT.java
 
b/server/src/test/java/org/apache/iotdb/db/integration/IoTDBContinuousQueryIT.java
index 07d8ff7..a0cc4c7 100644
--- 
a/server/src/test/java/org/apache/iotdb/db/integration/IoTDBContinuousQueryIT.java
+++ 
b/server/src/test/java/org/apache/iotdb/db/integration/IoTDBContinuousQueryIT.java
@@ -57,22 +57,13 @@ public class IoTDBContinuousQueryIT {
               Statement statement = connection.createStatement()) {
             do {
               for (String timeSeries : timeSeriesArray) {
-                boolean isSuccessful = false;
-                while (!isSuccessful) {
-                  try {
-                    statement.execute(
-                        String.format(
-                            "insert into %s(timestamp, temperature) 
values(now(), %.3f)",
-                            timeSeries, 200 * Math.random()));
-                    isSuccessful = true;
-                  } catch (SQLException throwable) {
-                    throwable.printStackTrace();
-                    fail(throwable.getMessage());
-                  }
-                }
+                statement.execute(
+                    String.format(
+                        "insert into %s(timestamp, temperature) values(now(), 
%.3f)",
+                        timeSeries, 200 * Math.random()));
               }
             } while (!isInterrupted());
-          } catch (SQLException e) {
+          } catch (Exception e) {
             exception = e;
           }
         }
diff --git 
a/server/src/test/java/org/apache/iotdb/db/integration/IoTDBTriggerExecutionIT.java
 
b/server/src/test/java/org/apache/iotdb/db/integration/IoTDBTriggerExecutionIT.java
index b5fb623..dba1a90 100644
--- 
a/server/src/test/java/org/apache/iotdb/db/integration/IoTDBTriggerExecutionIT.java
+++ 
b/server/src/test/java/org/apache/iotdb/db/integration/IoTDBTriggerExecutionIT.java
@@ -68,25 +68,10 @@ public class IoTDBTriggerExecutionIT {
             long count = 0;
             do {
               ++count;
-              boolean isSuccessful = false;
-              while (!isSuccessful) {
-                try {
-                  statement.execute(
-                      String.format(
-                          "insert into 
root.vehicle.d1(timestamp,s1,s2,s3,s4,s5,s6) values(%d,%d,%d,%d,%d,%s,\"%d\")",
-                          count,
-                          count,
-                          count,
-                          count,
-                          count,
-                          count % 2 == 0 ? "true" : "false",
-                          count));
-                  isSuccessful = true;
-                } catch (SQLException throwable) {
-                  fail(throwable.getMessage());
-                  LOGGER.error(throwable.getMessage());
-                }
-              }
+              statement.execute(
+                  String.format(
+                      "insert into 
root.vehicle.d1(timestamp,s1,s2,s3,s4,s5,s6) values(%d,%d,%d,%d,%d,%s,\"%d\")",
+                      count, count, count, count, count, count % 2 == 0 ? 
"true" : "false", count));
             } while (!isInterrupted());
           } catch (Exception e) {
             exception = e;

Reply via email to