You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by hu...@apache.org on 2022/07/12 09:02:35 UTC
[iotdb] 02/02: add some ITs
This is an automated email from the ASF dual-hosted git repository.
hui pushed a commit to branch lmh/emptySet
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 1e0741a74e968a0cf7986452f4a7b92e2d963432
Author: Minghui Liu <li...@foxmail.com>
AuthorDate: Tue Jul 12 17:02:01 2022 +0800
add some ITs
---
.../apache/iotdb/db/it/query/IoTDBResultSetIT.java | 29 ++++++++++++++++++++++
1 file changed, 29 insertions(+)
diff --git a/integration-test/src/test/java/org/apache/iotdb/db/it/query/IoTDBResultSetIT.java b/integration-test/src/test/java/org/apache/iotdb/db/it/query/IoTDBResultSetIT.java
index 3997852de9..34bf962755 100644
--- a/integration-test/src/test/java/org/apache/iotdb/db/it/query/IoTDBResultSetIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/db/it/query/IoTDBResultSetIT.java
@@ -39,6 +39,7 @@ import java.sql.Statement;
import java.sql.Types;
import static org.apache.iotdb.db.it.utils.TestUtils.prepareData;
+import static org.apache.iotdb.db.it.utils.TestUtils.resultSetEqualTest;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;
@@ -57,6 +58,8 @@ public class IoTDBResultSetIT {
"insert into root.sg.dev(time,status) values(1,3.14)"
};
+ private static final String[] emptyResultSet = new String[] {};
+
@BeforeClass
public static void setUp() throws Exception {
EnvFactory.getEnv().initBeforeClass();
@@ -128,4 +131,30 @@ public class IoTDBResultSetIT {
fail(e.getMessage());
}
}
+
+ @Test
+ public void emptyQueryTest1() {
+ String expectedHeader = "Time,";
+ resultSetEqualTest("select * from root.sg1.d1", expectedHeader, emptyResultSet);
+ }
+
+ @Test
+ public void emptyQueryTest2() {
+ String expectedHeader =
+ "Time,root.t1.wf01.wt01.status,root.t1.wf01.wt01.temperature,root.t1.wf01.wt01.type,root.t1.wf01.wt01.grade,";
+ resultSetEqualTest("select * from root.t1.wf01.wt01", expectedHeader, emptyResultSet);
+ }
+
+ @Test
+ public void emptyShowTimeseriesTest() {
+ String expectedHeader =
+ "timeseries,alias,storage group,dataType,encoding,compression,tags,attributes,";
+ resultSetEqualTest("show timeseries root.sg1.**", expectedHeader, emptyResultSet);
+ }
+
+ @Test
+ public void emptyShowDeviceTest() {
+ String expectedHeader = "devices,isAligned,";
+ resultSetEqualTest("show devices root.sg1.**", expectedHeader, emptyResultSet);
+ }
}