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

rong pushed a commit to branch iotdb-1845
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 32d25f6cda687de06973bafa1b89f597db73e1cd
Author: Steve Yurong Su <[email protected]>
AuthorDate: Thu Oct 14 16:12:34 2021 +0800

    Make the test results in IoTDBContinuousQueryIT deterministic
---
 .../org/apache/iotdb/db/integration/IoTDBContinuousQueryIT.java   | 8 ++++----
 1 file changed, 4 insertions(+), 4 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 a0cc4c7..00ead26 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
@@ -317,11 +317,11 @@ public class IoTDBContinuousQueryIT {
     }
 
     final long expectedSize = (duration / everyInterval + 1) * (forInterval / 
groupByInterval);
-    long waitSeconds = 0;
+    long waitMillSeconds = 0;
     List<Pair<Long, String>> result;
     do {
-      Thread.sleep(waitSeconds);
-      waitSeconds += 1000;
+      Thread.sleep(waitMillSeconds);
+      waitMillSeconds += 100;
 
       statement.execute("select temperature_avg from root.ln.wf01");
       result = collectQueryResult();
@@ -332,7 +332,7 @@ public class IoTDBContinuousQueryIT {
       long left = result.get(i).left;
 
       if (i == 0) {
-        assertTrue(Math.abs(creationTime + delay - forInterval - left) <= 100);
+        assertTrue(Math.abs(creationTime + delay - forInterval - left) < 2 * 
forInterval);
       } else {
         long pointNumPerForInterval = forInterval / groupByInterval;
         Assert.assertEquals(

Reply via email to