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

xingtanzjr pushed a commit to branch guonengtest
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/guonengtest by this push:
     new b991c5d824 spotless
b991c5d824 is described below

commit b991c5d82479503ed354a62219f4b063d1f2a2c8
Author: Jinrui.Zhang <[email protected]>
AuthorDate: Tue Apr 18 18:38:08 2023 +0800

    spotless
---
 example/session/src/main/java/org/apache/iotdb/ReadTest.java | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/example/session/src/main/java/org/apache/iotdb/ReadTest.java 
b/example/session/src/main/java/org/apache/iotdb/ReadTest.java
index b743a7a874..13b03d815a 100644
--- a/example/session/src/main/java/org/apache/iotdb/ReadTest.java
+++ b/example/session/src/main/java/org/apache/iotdb/ReadTest.java
@@ -203,15 +203,17 @@ public class ReadTest {
     @Override
     public void run() {
       for (int i = 0; i < READ_LOOP; i++) {
+        long cost = 10_000_000L;
+        signal.syncCountDownBeforeRead();
         try {
-          signal.syncCountDownBeforeRead();
           long startTime = System.nanoTime();
           executeQuery();
-          long cost = System.nanoTime() - startTime;
-          signal.finishReadAndWait(cost, i);
-        } catch (InterruptedException | IoTDBConnectionException | 
StatementExecutionException e) {
+          cost = System.nanoTime() - startTime;
+        } catch (IoTDBConnectionException | StatementExecutionException 
ignored) {
+
+        } finally {
           try {
-            signal.finishReadAndWait(10_000_000, i);
+            signal.finishReadAndWait(cost, i);
           } catch (InterruptedException ignored) {
 
           }

Reply via email to