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

jackietien pushed a commit to branch ty/FixCli
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/ty/FixCli by this push:
     new cc4c755db67 Add IT
cc4c755db67 is described below

commit cc4c755db6780047b72ca0d326eccb5735eb6e1a
Author: JackieTien97 <[email protected]>
AuthorDate: Wed Jun 26 15:15:16 2024 +0800

    Add IT
---
 .../apache/iotdb/cli/it/StartClientScriptIT.java   | 64 +++++++++++++++++++++-
 1 file changed, 63 insertions(+), 1 deletion(-)

diff --git 
a/integration-test/src/test/java/org/apache/iotdb/cli/it/StartClientScriptIT.java
 
b/integration-test/src/test/java/org/apache/iotdb/cli/it/StartClientScriptIT.java
index 7f9a2328929..c27d4d55818 100644
--- 
a/integration-test/src/test/java/org/apache/iotdb/cli/it/StartClientScriptIT.java
+++ 
b/integration-test/src/test/java/org/apache/iotdb/cli/it/StartClientScriptIT.java
@@ -117,7 +117,6 @@ public class StartClientScriptIT extends AbstractScript {
     testOutput(builder2, output2, 0);
   }
 
-  @Override
   protected void testOnUnix() throws IOException {
 
     final String[] output = {
@@ -151,5 +150,68 @@ public class StartClientScriptIT extends AbstractScript {
             "\"flush\"");
     builder2.environment().put("IOTDB_HOME", homePath);
     testOutput(builder2, output2, 0);
+
+    // test null display
+    final String[] successfulDisplay = {"Msg: The statement is executed 
successfully."};
+    ProcessBuilder builder3 =
+        new ProcessBuilder(
+            "bash",
+            sbinPath + File.separator + "start-cli.sh",
+            "-h",
+            ip,
+            "-p",
+            port,
+            "-e",
+            "\"CREATE ALIGNED TIMESERIES root.db.d1(s_boolean BOOLEAN, s_int32 
INT32)\"");
+    builder3.environment().put("IOTDB_HOME", homePath);
+    testOutput(builder3, successfulDisplay, 0);
+
+    ProcessBuilder builder4 =
+        new ProcessBuilder(
+            "bash",
+            sbinPath + File.separator + "start-cli.sh",
+            "-h",
+            ip,
+            "-p",
+            port,
+            "-e",
+            "\"insert into root.db.d1(time, s_int32) values(0,0)\"");
+    builder4.environment().put("IOTDB_HOME", homePath);
+    testOutput(builder4, successfulDisplay, 0);
+
+    final String[] output5 = {"Time zone has set to asia/shanghai"};
+    ProcessBuilder builder5 =
+        new ProcessBuilder(
+            "bash",
+            sbinPath + File.separator + "start-cli.sh",
+            "-h",
+            ip,
+            "-p",
+            port,
+            "-e",
+            "\"set time_zone=Asia/Shanghai\"");
+    builder5.environment().put("IOTDB_HOME", homePath);
+    testOutput(builder5, output5, 0);
+
+    final String[] output6 = {
+      "|                         
Time|root.db.d1.s_int32|root.db.d1.s_boolean|",
+      
"+-----------------------------+------------------+--------------------+",
+      "|1970-01-01T08:00:00.000+08:00|                 0|                
null|",
+      
"+-----------------------------+------------------+--------------------+",
+      "Total line number = 1",
+      "It costs "
+    };
+    ProcessBuilder builder6 =
+        new ProcessBuilder(
+            "bash",
+            sbinPath + File.separator + "start-cli.sh",
+            "-h",
+            ip,
+            "-p",
+            port,
+            "-e",
+            "\"select s_int32, s_boolean from root.db.d1;\"");
+    builder6.environment().put("IOTDB_HOME", homePath);
+    testOutput(builder6, output6, 0);
   }
 }

Reply via email to