From 3d4807fbe98bba33a8725b73de0d9d32eb7692c6 Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Wed, 31 Aug 2022 19:28:12 +0800 Subject: [PATCH] fix test cases --- tests/script/tsim/stable/alter_comment.sim | 2 +- tests/script/tsim/stable/alter_count.sim | 8 +-- tests/script/tsim/stable/alter_import.sim | 4 +- tests/script/tsim/stable/alter_insert1.sim | 4 +- tests/script/tsim/stable/alter_insert2.sim | 4 +- tests/script/tsim/stable/alter_metrics.sim | 6 +- tests/script/tsim/stable/column_add.sim | 6 +- tests/script/tsim/stable/column_modify.sim | 6 +- tests/script/tsim/stable/disk.sim | 2 +- tests/script/tsim/stable/refcount.sim | 2 +- tests/script/tsim/stable/tag_add.sim | 6 +- tests/script/tsim/stable/tag_drop.sim | 12 ++-- tests/script/tsim/stable/tag_filter.sim | 66 +++++++++++----------- tests/script/tsim/stable/tag_modify.sim | 6 +- tests/script/tsim/stable/tag_rename.sim | 6 +- 15 files changed, 70 insertions(+), 70 deletions(-) diff --git a/tests/script/tsim/stable/alter_comment.sim b/tests/script/tsim/stable/alter_comment.sim index beb049985c..7c2d6edfcb 100644 --- a/tests/script/tsim/stable/alter_comment.sim +++ b/tests/script/tsim/stable/alter_comment.sim @@ -95,7 +95,7 @@ sql_error alter table db.stb add tag t1 int sql_error alter table db.stb add tag t2 int sql_error alter table db.stb add tag t3 int sql alter table db.stb add tag t4 bigint -sql alter table db.stb add tag c1 int +sql alter table db.stb add tag c1 int sql alter table db.stb add tag t5 binary(12) sql select * from information_schema.ins_stables where db_name = 'db' diff --git a/tests/script/tsim/stable/alter_count.sim b/tests/script/tsim/stable/alter_count.sim index 83ea4b14fa..4a2aeca029 100644 --- a/tests/script/tsim/stable/alter_count.sim +++ b/tests/script/tsim/stable/alter_count.sim @@ -5,8 +5,8 @@ print ========= start dnode1 as master system sh/exec.sh -n dnode1 -s start sql connect -print ======== step1 -sql create database d1 replica 1 duration 7 keep 50 +print ======== step1 +sql create database d1 replica 1 duration 7 keep 50 sql use d1 sql create table tb (ts timestamp, a int) sql insert into tb values(now-28d, -28) @@ -83,7 +83,7 @@ if $data00 != 3 then endi print ======== step8 -# sql alter table tb(ts timestamp, a int, b smallint, c tinyint, d int, e bigint, f float, g double, h binary(10) ) +# sql alter table tb(ts timestamp, a int, b smallint, c tinyint, d int, e bigint, f float, g double, h binary(10) ) sql alter table tb add column h binary(10) sql insert into tb values(now-7d, -7, 18, 0, 0, 0, 0, 0, '0') sql insert into tb values(now-6d, -6, 19, 1, 1, 1, 1, 1, '1') @@ -260,4 +260,4 @@ if $data00 != 31 then return -1 endi -system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file +system sh/exec.sh -n dnode1 -s stop -x SIGINT diff --git a/tests/script/tsim/stable/alter_import.sim b/tests/script/tsim/stable/alter_import.sim index b968eb6a12..7431ea698a 100644 --- a/tests/script/tsim/stable/alter_import.sim +++ b/tests/script/tsim/stable/alter_import.sim @@ -5,7 +5,7 @@ print ========= start dnode1 as master system sh/exec.sh -n dnode1 -s start sql connect -print ======== step1 +print ======== step1 sql create database d1 replica 1 duration 7 keep 50 sql use d1 sql create table tb (ts timestamp, a int) @@ -42,4 +42,4 @@ if $data00 != 6 then return -1 endi -system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file +system sh/exec.sh -n dnode1 -s stop -x SIGINT diff --git a/tests/script/tsim/stable/alter_insert1.sim b/tests/script/tsim/stable/alter_insert1.sim index bcea0b48c4..0e5617e92d 100644 --- a/tests/script/tsim/stable/alter_insert1.sim +++ b/tests/script/tsim/stable/alter_insert1.sim @@ -3,7 +3,7 @@ system sh/deploy.sh -n dnode1 -i 1 system sh/exec.sh -n dnode1 -s start sql connect -print ======== step1 +print ======== step1 sql create database d3 sql use d3 sql create table tb (ts timestamp, a int) @@ -1137,4 +1137,4 @@ if $data79 != null then return -1 endi -system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file +system sh/exec.sh -n dnode1 -s stop -x SIGINT diff --git a/tests/script/tsim/stable/alter_insert2.sim b/tests/script/tsim/stable/alter_insert2.sim index faae24d32a..a6046f3dda 100644 --- a/tests/script/tsim/stable/alter_insert2.sim +++ b/tests/script/tsim/stable/alter_insert2.sim @@ -3,7 +3,7 @@ system sh/deploy.sh -n dnode1 -i 1 system sh/exec.sh -n dnode1 -s start sql connect -print ======== step1 +print ======== step1 sql create database d4 sql use d4 sql create table tb (ts timestamp, a int, b smallint, c tinyint, d int, e bigint, f float, g double, h binary(10)) @@ -662,4 +662,4 @@ if $data62 != null then return -1 endi -system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file +system sh/exec.sh -n dnode1 -s stop -x SIGINT diff --git a/tests/script/tsim/stable/alter_metrics.sim b/tests/script/tsim/stable/alter_metrics.sim index e32250de13..203f41e18b 100644 --- a/tests/script/tsim/stable/alter_metrics.sim +++ b/tests/script/tsim/stable/alter_metrics.sim @@ -3,7 +3,7 @@ system sh/deploy.sh -n dnode1 -i 1 system sh/exec.sh -n dnode1 -s start sql connect -print ======== step1 +print ======== step1 sql create database d2 sql use d2 sql create table mt (ts timestamp, a int) TAGS (t int) @@ -757,8 +757,8 @@ endi print ======= over sql drop database d2 sql select * from information_schema.ins_databases -if $rows != 2 then +if $rows != 2 then return -1 endi -system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file +system sh/exec.sh -n dnode1 -s stop -x SIGINT diff --git a/tests/script/tsim/stable/column_add.sim b/tests/script/tsim/stable/column_add.sim index c0f3b4f490..05189f6c7d 100644 --- a/tests/script/tsim/stable/column_add.sim +++ b/tests/script/tsim/stable/column_add.sim @@ -116,7 +116,7 @@ if $data[0][1] != 1 then endi if $data[0][2] != 2 then return -1 -endi +endi if $data[0][3] != NULL then return -1 endi @@ -153,7 +153,7 @@ if $data[0][1] != 1 then endi if $data[0][2] != 2 then return -1 -endi +endi if $data[0][3] != NULL then return -1 endi @@ -299,4 +299,4 @@ if $rows != 10 then return -1 endi -system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file +system sh/exec.sh -n dnode1 -s stop -x SIGINT diff --git a/tests/script/tsim/stable/column_modify.sim b/tests/script/tsim/stable/column_modify.sim index e2752ccf95..43284ba829 100644 --- a/tests/script/tsim/stable/column_modify.sim +++ b/tests/script/tsim/stable/column_modify.sim @@ -31,7 +31,7 @@ if $data[0][1] != 1 then endi if $data[0][2] != 1234 then return -1 -endi +endi if $data[0][3] != 101 then return -1 endi @@ -92,7 +92,7 @@ if $data[0][1] != 1 then endi if $data[0][2] != 1234 then return -1 -endi +endi if $data[0][3] != 101 then return -1 endi @@ -106,4 +106,4 @@ if $data[1][3] != 101 then return -1 endi -system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file +system sh/exec.sh -n dnode1 -s stop -x SIGINT diff --git a/tests/script/tsim/stable/disk.sim b/tests/script/tsim/stable/disk.sim index e0e51b2625..8edd0a845e 100644 --- a/tests/script/tsim/stable/disk.sim +++ b/tests/script/tsim/stable/disk.sim @@ -188,4 +188,4 @@ if $rows != 2 then return -1 endi -system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file +system sh/exec.sh -n dnode1 -s stop -x SIGINT diff --git a/tests/script/tsim/stable/refcount.sim b/tests/script/tsim/stable/refcount.sim index a83c0ca53f..35d8767efd 100644 --- a/tests/script/tsim/stable/refcount.sim +++ b/tests/script/tsim/stable/refcount.sim @@ -123,4 +123,4 @@ if $rows != 2 then endi print =============== step6 -system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file +system sh/exec.sh -n dnode1 -s stop -x SIGINT diff --git a/tests/script/tsim/stable/tag_add.sim b/tests/script/tsim/stable/tag_add.sim index 7ee9aee974..4f5f0e7452 100644 --- a/tests/script/tsim/stable/tag_add.sim +++ b/tests/script/tsim/stable/tag_add.sim @@ -139,7 +139,7 @@ if $data[0][1] != 1 then endi if $data[0][2] != 2 then return -1 -endi +endi if $data[0][3] != 101 then return -1 endi @@ -170,7 +170,7 @@ if $data[0][1] != 1 then endi if $data[0][2] != 2 then return -1 -endi +endi if $data[0][3] != 101 then return -1 endi @@ -190,4 +190,4 @@ if $rows != 7 then return -1 endi -system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file +system sh/exec.sh -n dnode1 -s stop -x SIGINT diff --git a/tests/script/tsim/stable/tag_drop.sim b/tests/script/tsim/stable/tag_drop.sim index 7902358817..b457bf195b 100644 --- a/tests/script/tsim/stable/tag_drop.sim +++ b/tests/script/tsim/stable/tag_drop.sim @@ -165,7 +165,7 @@ if $data[0][1] != 1 then endi if $data[0][2] != 2 then return -1 -endi +endi if $data[0][3] != 101 then return -1 endi @@ -196,7 +196,7 @@ if $data[0][1] != 1 then endi if $data[0][2] != 2 then return -1 -endi +endi if $data[0][3] != 201 then return -1 endi @@ -229,7 +229,7 @@ if $data[0][1] != 1 then endi if $data[0][2] != 2 then return -1 -endi +endi if $data[0][3] != 201 then return -1 endi @@ -261,7 +261,7 @@ if $data[0][1] != 1 then endi if $data[0][2] != 2 then return -1 -endi +endi if $data[0][3] != 301 then return -1 endi @@ -323,7 +323,7 @@ if $data[0][1] != 1 then endi if $data[0][2] != 2 then return -1 -endi +endi if $data[0][3] != 302 then return -1 endi @@ -334,4 +334,4 @@ if $data[0][5] != 304 then return -1 endi -system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file +system sh/exec.sh -n dnode1 -s stop -x SIGINT diff --git a/tests/script/tsim/stable/tag_filter.sim b/tests/script/tsim/stable/tag_filter.sim index f44142fbbf..de2a87d6c4 100644 --- a/tests/script/tsim/stable/tag_filter.sim +++ b/tests/script/tsim/stable/tag_filter.sim @@ -27,47 +27,47 @@ sql create table db.ctb6 using db.stb tags(6, "102") sql insert into db.ctb6 values(now, 6, "2") sql select * from db.stb where t1 = 1 -if $rows != 1 then +if $rows != 1 then return -1 endi -sql select * from db.stb where t1 < 1 -if $rows != 0 then +sql select * from db.stb where t1 < 1 +if $rows != 0 then return -=1 endi -sql select * from db.stb where t1 < 2 -if $rows != 1 then +sql select * from db.stb where t1 < 2 +if $rows != 1 then return -1 endi -sql select * from db.stb where t1 <= 2 -if $rows != 2 then +sql select * from db.stb where t1 <= 2 +if $rows != 2 then return -1 endi -sql select * from db.stb where t1 >= 1 -if $rows != 6 then +sql select * from db.stb where t1 >= 1 +if $rows != 6 then return -1 endi -sql select * from db.stb where t1 > 1 -if $rows != 5 then +sql select * from db.stb where t1 > 1 +if $rows != 5 then return -1 endi -sql select * from db.stb where t1 between 1 and 1 -if $rows != 1 then +sql select * from db.stb where t1 between 1 and 1 +if $rows != 1 then return -1 endi -sql select * from db.stb where t1 between 1 and 6 -if $rows != 6 then +sql select * from db.stb where t1 between 1 and 6 +if $rows != 6 then return -1 endi -sql select * from db.stb where t1 between 1 and 7 -if $rows != 6 then +sql select * from db.stb where t1 between 1 and 7 +if $rows != 6 then return -1 endi @@ -88,25 +88,25 @@ sql insert into db.ctbBin2 values(now, 3, "2") sql create table db.ctbBin3 using db.stbBin tags("d") sql insert into db.ctbBin3 values(now, 4, "2") -sql select * from db.stbBin where t1 = "a" -if $rows != 1 then +sql select * from db.stbBin where t1 = "a" +if $rows != 1 then return -1 endi -sql select * from db.stbBin where t1 < "a" -if $rows != 0 then +sql select * from db.stbBin where t1 < "a" +if $rows != 0 then return -=1 endi -sql select * from db.stbBin where t1 < "b" -if $rows != 1 then +sql select * from db.stbBin where t1 < "b" +if $rows != 1 then return -1 endi -sql select * from db.stbBin where t1 between "a" and "e" -if $rows != 4 then +sql select * from db.stbBin where t1 between "a" and "e" +if $rows != 4 then return -1 endi @@ -127,25 +127,25 @@ sql insert into db.ctbNc2 values(now, 3, "2") sql create table db.ctbNc3 using db.stbNc tags("d") sql insert into db.ctbNc3 values(now, 4, "2") -sql select * from db.stbNc where t1 = "a" -if $rows != 1 then +sql select * from db.stbNc where t1 = "a" +if $rows != 1 then return -1 endi -sql select * from db.stbNc where t1 < "a" -if $rows != 0 then +sql select * from db.stbNc where t1 < "a" +if $rows != 0 then return -=1 endi -sql select * from db.stbNc where t1 < "b" -if $rows != 1 then +sql select * from db.stbNc where t1 < "b" +if $rows != 1 then return -1 endi -sql select * from db.stbNc where t1 between "a" and "e" -if $rows != 4 then +sql select * from db.stbNc where t1 between "a" and "e" +if $rows != 4 then return -1 endi system sh/exec.sh -n dnode1 -s stop -x SIGINT diff --git a/tests/script/tsim/stable/tag_modify.sim b/tests/script/tsim/stable/tag_modify.sim index 909ed79359..53e7227d1b 100644 --- a/tests/script/tsim/stable/tag_modify.sim +++ b/tests/script/tsim/stable/tag_modify.sim @@ -28,7 +28,7 @@ if $data[0][1] != 1 then endi if $data[0][2] != 1234 then return -1 -endi +endi if $data[0][3] != 101 then return -1 endi @@ -55,7 +55,7 @@ if $data[0][1] != 1 then endi if $data[0][2] != 1234 then return -1 -endi +endi if $data[0][3] != 101 then return -1 endi @@ -120,4 +120,4 @@ if $data[4][2] != 5 then return -1 endi -system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file +system sh/exec.sh -n dnode1 -s stop -x SIGINT diff --git a/tests/script/tsim/stable/tag_rename.sim b/tests/script/tsim/stable/tag_rename.sim index 5bdfa24990..c85ed183de 100644 --- a/tests/script/tsim/stable/tag_rename.sim +++ b/tests/script/tsim/stable/tag_rename.sim @@ -28,7 +28,7 @@ if $data[0][1] != 1 then endi if $data[0][2] != 1234 then return -1 -endi +endi if $data[0][3] != 101 then return -1 endi @@ -52,7 +52,7 @@ if $data[0][1] != 1 then endi if $data[0][2] != 1234 then return -1 -endi +endi if $data[0][3] != 101 then return -1 endi @@ -117,4 +117,4 @@ if $data[4][2] != 4 then return -1 endi -system sh/exec.sh -n dnode1 -s stop -x SIGINT \ No newline at end of file +system sh/exec.sh -n dnode1 -s stop -x SIGINT