From 72d680223154c4fceb942f8f1a5936bd981c86a0 Mon Sep 17 00:00:00 2001 From: Ganlin Zhao Date: Thu, 11 Aug 2022 16:21:31 +0800 Subject: [PATCH] fix test cases --- tests/script/tsim/sma/drop_sma.sim | 24 +++++++++---------- .../script/tsim/sma/rsmaCreateInsertQuery.sim | 8 +++---- .../tsim/sma/rsmaPersistenceRecovery.sim | 6 ++--- .../script/tsim/sma/tsmaCreateInsertQuery.sim | 4 ++-- 4 files changed, 21 insertions(+), 21 deletions(-) diff --git a/tests/script/tsim/sma/drop_sma.sim b/tests/script/tsim/sma/drop_sma.sim index 78f86f6e19..2b4c292284 100644 --- a/tests/script/tsim/sma/drop_sma.sim +++ b/tests/script/tsim/sma/drop_sma.sim @@ -52,21 +52,21 @@ sql create sma index sma_index_name1 on stb function(max(c1),max(c2),min(c1)) in print --> show sma sql show indexes from stb from d1; -if $rows != 1 then +if $rows != 1 then return -1 endi -if $data[0][0] != sma_index_name1 then +if $data[0][0] != sma_index_name1 then return -1 endi -if $data[0][1] != d1 then +if $data[0][1] != d1 then return -1 endi -if $data[0][2] != stb then +if $data[0][2] != stb then return -1 endi print --> drop stb -sql drop table stb; +sql drop table stb; print ========== step4 repeat @@ -78,23 +78,23 @@ sql create sma index sma_index_name1 on stb function(max(c1),max(c2),min(c1)) in print --> show sma sql show indexes from stb from d1; -if $rows != 1 then +if $rows != 1 then return -1 endi -if $data[0][0] != sma_index_name1 then +if $data[0][0] != sma_index_name1 then return -1 endi -if $data[0][1] != d1 then +if $data[0][1] != d1 then return -1 endi -if $data[0][2] != stb then +if $data[0][2] != stb then return -1 endi print --> drop stb -sql drop table stb; +sql drop table stb; -print ========== step5 +print ========== step5 sql drop database if exists db; sql create database db duration 300; sql use db; @@ -149,4 +149,4 @@ sql DROP INDEX sma_index_3 ; system sh/exec.sh -n dnode1 -s stop -x SIGINT system sh/exec.sh -n dnode2 -s stop -x SIGINT system sh/exec.sh -n dnode3 -s stop -x SIGINT -system sh/exec.sh -n dnode4 -s stop -x SIGINT \ No newline at end of file +system sh/exec.sh -n dnode4 -s stop -x SIGINT diff --git a/tests/script/tsim/sma/rsmaCreateInsertQuery.sim b/tests/script/tsim/sma/rsmaCreateInsertQuery.sim index 86bdbdcded..04cf09715c 100644 --- a/tests/script/tsim/sma/rsmaCreateInsertQuery.sim +++ b/tests/script/tsim/sma/rsmaCreateInsertQuery.sim @@ -12,7 +12,7 @@ print =============== create super table and register rsma sql create table if not exists stb (ts timestamp, c1 int) tags (city binary(20),district binary(20)) rollup(min); sql show stables -if $rows != 1 then +if $rows != 1 then return -1 endi @@ -20,7 +20,7 @@ print =============== create child table sql create table ct1 using stb tags("BeiJing", "ChaoYang"); sql show tables -if $rows != 1 then +if $rows != 1 then return -1 endi @@ -119,7 +119,7 @@ endi print =============== select * from retention level 0 from file sql select * from ct1 where ts > now-3d; -print $data00 $data01 +print $data00 $data01 print $data10 $data11 print $data20 $data21 if $rows < 1 then @@ -132,4 +132,4 @@ if $data01 != 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/sma/rsmaPersistenceRecovery.sim b/tests/script/tsim/sma/rsmaPersistenceRecovery.sim index 405d22ebdd..f53cd45d48 100644 --- a/tests/script/tsim/sma/rsmaPersistenceRecovery.sim +++ b/tests/script/tsim/sma/rsmaPersistenceRecovery.sim @@ -12,7 +12,7 @@ print =============== create super table and register rsma sql create table if not exists stb (ts timestamp, c1 int, c2 float) tags (city binary(20),district binary(20)) rollup(max) max_delay 5s,5s watermark 2s,3s; sql show stables -if $rows != 1 then +if $rows != 1 then return -1 endi @@ -20,7 +20,7 @@ print =============== create child table sql create table ct1 using stb tags("BeiJing", "ChaoYang"); sql show tables -if $rows != 1 then +if $rows != 1 then return -1 endi @@ -234,4 +234,4 @@ 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/sma/tsmaCreateInsertQuery.sim b/tests/script/tsim/sma/tsmaCreateInsertQuery.sim index e3b38d415c..cc1d507df2 100644 --- a/tests/script/tsim/sma/tsmaCreateInsertQuery.sim +++ b/tests/script/tsim/sma/tsmaCreateInsertQuery.sim @@ -12,7 +12,7 @@ print =============== create super table, include column type for count/sum/min/ sql create table if not exists stb (ts timestamp, c1 int, c2 float, c3 double) tags (t1 int unsigned) sql show stables -if $rows != 1 then +if $rows != 1 then return -1 endi @@ -20,7 +20,7 @@ print =============== create child table sql create table ct1 using stb tags(1000) sql show tables -if $rows != 1 then +if $rows != 1 then return -1 endi