You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by yo...@apache.org on 2025/12/11 11:34:26 UTC
(iotdb) branch bug-fix-ain created (now e63a1b0c476)
This is an automated email from the ASF dual-hosted git repository.
yongzao pushed a change to branch bug-fix-ain
in repository https://gitbox.apache.org/repos/asf/iotdb.git
at e63a1b0c476 finish
This branch includes the following new commits:
new e63a1b0c476 finish
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(iotdb) 01/01: finish
Posted by yo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
yongzao pushed a commit to branch bug-fix-ain
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit e63a1b0c47664b396de2f3fed8c6bb55b8b3c513
Author: Yongzao <53...@qq.com>
AuthorDate: Thu Dec 11 19:34:00 2025 +0800
finish
---
.../org/apache/iotdb/ainode/it/AINodeConcurrentForecastIT.java | 2 +-
.../java/org/apache/iotdb/ainode/utils/AINodeTestUtils.java | 10 +++++++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/integration-test/src/test/java/org/apache/iotdb/ainode/it/AINodeConcurrentForecastIT.java b/integration-test/src/test/java/org/apache/iotdb/ainode/it/AINodeConcurrentForecastIT.java
index 64029c1e34b..844ec1d8223 100644
--- a/integration-test/src/test/java/org/apache/iotdb/ainode/it/AINodeConcurrentForecastIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/ainode/it/AINodeConcurrentForecastIT.java
@@ -49,7 +49,7 @@ public class AINodeConcurrentForecastIT {
private static final Logger LOGGER = LoggerFactory.getLogger(AINodeConcurrentForecastIT.class);
private static final String FORECAST_TABLE_FUNCTION_SQL_TEMPLATE =
- "SELECT * FROM FORECAST(model_id=>'%s', input=>(SELECT time,s FROM root.AI) ORDER BY time, forecast_length=>%d)";
+ "SELECT * FROM FORECAST(model_id=>'%s', input=>(SELECT time,s FROM root.AI) ORDER BY time, output_length=>%d)";
@BeforeClass
public static void setUp() throws Exception {
diff --git a/integration-test/src/test/java/org/apache/iotdb/ainode/utils/AINodeTestUtils.java b/integration-test/src/test/java/org/apache/iotdb/ainode/utils/AINodeTestUtils.java
index 0de90c42925..4abc1fd6d8e 100644
--- a/integration-test/src/test/java/org/apache/iotdb/ainode/utils/AINodeTestUtils.java
+++ b/integration-test/src/test/java/org/apache/iotdb/ainode/utils/AINodeTestUtils.java
@@ -20,6 +20,7 @@
package org.apache.iotdb.ainode.utils;
import com.google.common.collect.ImmutableSet;
+import org.junit.Assert;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -34,6 +35,7 @@ import java.util.Map;
import java.util.Objects;
import java.util.Set;
import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
import java.util.stream.Collectors;
import java.util.stream.Stream;
@@ -101,6 +103,7 @@ public class AINodeTestUtils {
public static void concurrentInference(
Statement statement, String sql, int threadCnt, int loop, int expectedOutputLength)
throws InterruptedException {
+ AtomicBoolean allPass = new AtomicBoolean(true);
Thread[] threads = new Thread[threadCnt];
for (int i = 0; i < threadCnt; i++) {
threads[i] =
@@ -113,13 +116,17 @@ public class AINodeTestUtils {
while (resultSet.next()) {
outputCnt++;
}
- assertEquals(expectedOutputLength, outputCnt);
+ if (expectedOutputLength != outputCnt) {
+ allPass.set(false);
+ }
} catch (SQLException e) {
fail(e.getMessage());
+ allPass.set(false);
}
}
} catch (Exception e) {
fail(e.getMessage());
+ allPass.set(false);
}
});
threads[i].start();
@@ -129,6 +136,7 @@ public class AINodeTestUtils {
if (thread.isAlive()) {
fail("Thread timeout after 10 minutes");
}
+ Assert.assertTrue(allPass.get());
}
}