You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ha...@apache.org on 2022/04/28 11:13:40 UTC

[iotdb] branch sggg created (now fe7bc4d6a3)

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

haonan pushed a change to branch sggg
in repository https://gitbox.apache.org/repos/asf/iotdb.git


      at fe7bc4d6a3 add IT for delete storage group

This branch includes the following new commits:

     new fe7bc4d6a3 add IT for delete storage group

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: add IT for delete storage group

Posted by ha...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit fe7bc4d6a399ef57edab5aeafe42866cd5ab8366
Author: HTHou <hh...@outlook.com>
AuthorDate: Thu Apr 28 19:12:56 2022 +0800

    add IT for delete storage group
---
 .../db/integration/IoTDBDeleteStorageGroupIT.java  | 24 ++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/integration/src/test/java/org/apache/iotdb/db/integration/IoTDBDeleteStorageGroupIT.java b/integration/src/test/java/org/apache/iotdb/db/integration/IoTDBDeleteStorageGroupIT.java
index ac5873b0b6..2c3700c9d1 100644
--- a/integration/src/test/java/org/apache/iotdb/db/integration/IoTDBDeleteStorageGroupIT.java
+++ b/integration/src/test/java/org/apache/iotdb/db/integration/IoTDBDeleteStorageGroupIT.java
@@ -25,6 +25,7 @@ import org.apache.iotdb.itbase.category.RemoteTest;
 import org.apache.iotdb.jdbc.IoTDBSQLException;
 
 import org.junit.After;
+import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Test;
 import org.junit.experimental.categories.Category;
@@ -180,4 +181,27 @@ public class IoTDBDeleteStorageGroupIT {
       assertEquals(1, count);
     }
   }
+
+  @Test
+  public void testSelectIntoAndDeleteStorageGroup() throws Exception {
+    try (Connection connection = EnvFactory.getEnv().getConnection();
+        Statement statement = connection.createStatement()) {
+      statement.execute(
+          "create schema template t1 (temperature FLOAT encoding=RLE, status BOOLEAN encoding=PLAIN compression=SNAPPY)");
+      statement.execute("set schema template t1 to root.sg1.d1;");
+      statement.execute("create timeseries of schema template on root.sg1.d1;");
+      statement.execute("show timeseries root.sg1.**;");
+      statement.execute("show devices root.sg1.**;");
+      statement.execute("insert into root.sg1.d1(time, temperature, status) values(1, 1, TRUE);");
+      statement.execute(
+          "insert into root.sg1.d1(time, temperature, status) values(2, 2, FALSE), (3, 3, TRUE);");
+      statement.execute("select temperature into h1 from root.sg1.**;");
+      statement.execute("select temperature,h1 from root.sg1.**;");
+      statement.execute("show schema templates;");
+      statement.execute("delete storage group root.**;");
+      statement.execute("drop schema template t1;");
+    } catch (Exception e) {
+      Assert.fail();
+    }
+  }
 }