You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@iotdb.apache.org by GitBox <gi...@apache.org> on 2022/08/01 03:13:12 UTC

[GitHub] [iotdb] MarcosZyk commented on a diff in pull request #6842: [IOTDB-3280] Can not set ttl to all sg in cli with one sql

MarcosZyk commented on code in PR #6842:
URL: https://github.com/apache/iotdb/pull/6842#discussion_r934104930


##########
integration/src/test/java/org/apache/iotdb/db/integration/IoTDBTtlIT.java:
##########
@@ -77,6 +77,31 @@ public void testTTL() throws SQLException, InterruptedException {
         assertEquals(TSStatusCode.STORAGE_GROUP_NOT_EXIST.getStatusCode(), e.getErrorCode());
       }
 
+      statement.execute("SET STORAGE GROUP TO root.TTL_SG2");
+      statement.execute("CREATE TIMESERIES root.TTL_SG2.s1 WITH DATATYPE=INT64,ENCODING=PLAIN");
+      try {
+        statement.execute("SET TTL TO root.TTL_SG2.s1 1000");
+      } catch (SQLException e) {
+        assertEquals(TSStatusCode.STORAGE_GROUP_NOT_EXIST.getStatusCode(), e.getErrorCode());
+      }
+
+      try {
+        statement.execute("SET TTL TO root.** 1000");
+      } catch (SQLException e) {
+        assertEquals(TSStatusCode.TIMESERIES_NOT_EXIST.getStatusCode(), e.getErrorCode());
+      }

Review Comment:
   The IT in integration package is only run by old-standalone. Add the IT to integration-test package and follow the new-IT rule. Besides, if you expect exception in this test case, ```Assert.fail()``` is necessary.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@iotdb.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org