diff --git a/tests/script/jenkins/basic.txt b/tests/script/jenkins/basic.txt index 4d25d37f949452e20b2198d9fb6e6ceaf2a9d734..8c5d522038f1bfd4b02576d995be5c5f201bd159 100644 --- a/tests/script/jenkins/basic.txt +++ b/tests/script/jenkins/basic.txt @@ -96,7 +96,7 @@ # jira ./test.sh -f tsim/parser/columnValue.sim ./test.sh -f tsim/parser/commit.sim # jira ./test.sh -f tsim/parser/condition.sim -## ./test.sh -f tsim/parser/constCol.sim +./test.sh -f tsim/parser/constCol.sim ./test.sh -f tsim/parser/create_db.sim ./test.sh -f tsim/parser/create_mt.sim # jira ./test.sh -f tsim/parser/create_tb_with_tag_name.sim @@ -113,11 +113,11 @@ # ./test.sh -f tsim/parser/groupby.sim # ./test.sh -f tsim/parser/having_child.sim ## ./test.sh -f tsim/parser/having.sim -## ./test.sh -f tsim/parser/import.sim -# ./test.sh -f tsim/parser/import_commit1.sim -# ./test.sh -f tsim/parser/import_commit2.sim -# ./test.sh -f tsim/parser/import_commit3.sim -## ./test.sh -f tsim/parser/import_file.sim +./test.sh -f tsim/parser/import_commit1.sim +./test.sh -f tsim/parser/import_commit2.sim +./test.sh -f tsim/parser/import_commit3.sim +# jira ./test.sh -f tsim/parser/import_file.sim +./test.sh -f tsim/parser/import.sim ## ./test.sh -f tsim/parser/insert_multiTbl.sim # ./test.sh -f tsim/parser/insert_tb.sim ## ./test.sh -f tsim/parser/interp.sim @@ -159,7 +159,7 @@ ./test.sh -f tsim/parser/stableOp.sim # ./test.sh -f tsim/parser/tags_dynamically_specifiy.sim # ./test.sh -f tsim/parser/tags_filter.sim -# jira ./test.sh -f tsim/parser/tbnameIn.sim +./test.sh -f tsim/parser/tbnameIn.sim ./test.sh -f tsim/parser/timestamp.sim ./test.sh -f tsim/parser/top_groupby.sim ./test.sh -f tsim/parser/topbot.sim @@ -328,7 +328,7 @@ ./test.sh -f tsim/vnode/stable_replica3_vnode3.sim # --- sync -./test.sh -f tsim/sync/3Replica1VgElect.sim +# jira ./test.sh -f tsim/sync/3Replica1VgElect.sim ./test.sh -f tsim/sync/3Replica5VgElect.sim ./test.sh -f tsim/sync/oneReplica1VgElect.sim ./test.sh -f tsim/sync/oneReplica5VgElect.sim diff --git a/tests/script/tsim/parser/constCol.sim b/tests/script/tsim/parser/constCol.sim index 5f50c950dd6a929af11b13b1a2c0d338479209e1..5eb5b419fbcd94d39cb03b32d3ad7f84e776fe00 100644 --- a/tests/script/tsim/parser/constCol.sim +++ b/tests/script/tsim/parser/constCol.sim @@ -8,20 +8,16 @@ sql use db; sql create table t (ts timestamp, i int); sql create table st1 (ts timestamp, f1 int) tags(t1 int); sql create table st2 (ts timestamp, f2 int) tags(t2 int); - sql create table t1 using st1 tags(1); sql create table t2 using st2 tags(1); sql insert into t1 values(1575880055000, 1); sql insert into t1 values(1575880059000, 1); sql insert into t1 values(1575880069000, 1); - sql insert into t2 values(1575880055000, 2); sql select st1.ts, st1.f1, st2.f2 from db.st1, db.st2 where st1.t1=st2.t2 and st1.ts=st2.ts -system_content curl -H 'Authorization: Taosd /KfeAzX/f9na8qdtNZmtONryp201ma04bEl8LcvLUd7a8qdtNZmtONryp201ma04' -d 'select st1.ts, st1.f1, st2.f2 from db.st1, db.st2 where st1.t1=st2.t2 and st1.ts=st2.ts' 127.0.0.1:7111/restful/sql - print ==============select with user-defined columns sql select 'abc' as f, ts,f1 from t1 if $rows != 3 then @@ -301,13 +297,13 @@ if $data04 != 1.982700000 then endi print ======================udc with interval -sql select count(*), 'uuu' from t1 interval(1s) order by ts desc; +sql select count(*), 'uuu' from t1 interval(1s); if $rows != 3 then return -1 endi print ======================udc with tags -sql select t1,'abc',tbname from st1 +sql select distinct t1,'abc',tbname from st1 if $rows != 1 then return -1 endi @@ -343,31 +339,26 @@ if $rows != 0 then return -1 endi - print ======================udc with normal column group by - sql_error select from t1 sql_error select abc from t1 sql_error select abc as tu from t1 print ========================> td-1756 -sql_error select * from t1 where ts>now-1y -sql_error select * from t1 where ts>now-1n +sql select * from t1 where ts>now-1y +sql select * from t1 where ts>now-1n print ========================> td-1752 sql select * from db.st2 where t2 < 200 and t2 is not null; if $rows != 1 then return -1 endi - if $data00 != @19-12-09 16:27:35.000@ then return -1 endi - if $data01 != 2 then return -1 endi - if $data02 != 1 then return -1 endi @@ -376,7 +367,6 @@ sql select * from db.st2 where t2 > 200 or t2 is null; if $rows != 0 then return -1 endi - sql select * from st2 where t2 < 200 and t2 is null; if $rows != 0 then return -1 diff --git a/tests/script/tsim/parser/import.sim b/tests/script/tsim/parser/import.sim index 5946cff4e211a0237114cb4c8b5eda6d92752c1d..332ddba6b5866410910ce6f0bdd4ef4bcd79884e 100644 --- a/tests/script/tsim/parser/import.sim +++ b/tests/script/tsim/parser/import.sim @@ -22,15 +22,10 @@ sql use $db sql create table tb (ts timestamp, c1 int, c2 timestamp) sql insert into tb values ('2019-05-05 11:30:00.000', 1, now) sql insert into tb values ('2019-05-05 12:00:00.000', 1, now) -sleep 500 sql import into tb values ('2019-05-05 11:00:00.000', -1, now) -sleep 500 sql import into tb values ('2019-05-05 11:59:00.000', -1, now) -sleep 500 sql import into tb values ('2019-05-04 08:00:00.000', -1, now) -sleep 500 sql import into tb values ('2019-05-04 07:59:00.000', -1, now) -sleep 500 sql select * from tb if $rows != 6 then @@ -57,11 +52,9 @@ endi print ================== restart server to commit data into disk system sh/exec.sh -n dnode1 -s stop -x SIGINT -sleep 500 system sh/exec.sh -n dnode1 -s start print ================== server restart completed sql connect -sleep 100 sql use $db sql select * from tb diff --git a/tests/script/tsim/parser/import_commit1.sim b/tests/script/tsim/parser/import_commit1.sim index 23259d8b016498fd8176a4c9c1a900819dcad306..e1aa0b6bb0a2254a5141a8e58c40f052b8cc82f4 100644 --- a/tests/script/tsim/parser/import_commit1.sim +++ b/tests/script/tsim/parser/import_commit1.sim @@ -19,7 +19,7 @@ $stb = $stbPrefix . $i sql drop database $db -x step1 step1: -sql create database $db cache 16 +sql create database $db print ====== create tables sql use $db @@ -36,8 +36,6 @@ while $x < $rowNum endw print ====== tables created -sleep 500 - $ts = $ts0 + $delta $ts = $ts + 1 sql import into $tb values ( $ts , -1) diff --git a/tests/script/tsim/parser/import_commit2.sim b/tests/script/tsim/parser/import_commit2.sim index 49fca0d477a20be3be54d2acfe55c6ecfc4a728c..783a90281808b31cf0da434417eec94112d9b182 100644 --- a/tests/script/tsim/parser/import_commit2.sim +++ b/tests/script/tsim/parser/import_commit2.sim @@ -18,7 +18,7 @@ $stb = $stbPrefix . $i sql drop database $db -x step1 step1: -sql create database $db cache 16 +sql create database $db print ====== create tables sql use $db @@ -35,8 +35,6 @@ while $x < $rowNum endw print ====== tables created -sleep 500 - $ts = $ts0 + $delta $ts = $ts + 1 sql import into $tb values ( $ts , -1) diff --git a/tests/script/tsim/parser/import_commit3.sim b/tests/script/tsim/parser/import_commit3.sim index d353c10387debd9c7ea6d467b82cf490fc06ce2d..1dc985cc1d978a16bae59cf92123bf6d30801252 100644 --- a/tests/script/tsim/parser/import_commit3.sim +++ b/tests/script/tsim/parser/import_commit3.sim @@ -18,7 +18,7 @@ $stb = $stbPrefix . $i sql drop database $db -x step1 step1: -sql create database $db cache 16 +sql create database $db print ====== create tables sql use $db sql reset query cache @@ -35,16 +35,12 @@ while $x < $rowNum endw print ====== tables created -sleep 500 - $ts = $ts + 1 sql insert into $tb values ( $ts , -1, -1, -1, -1, -1) $ts = $ts0 + $delta $ts = $ts + 1 sql import into $tb values ( $ts , -2, -2, -2, -2, -2) -sleep 500 - sql show databases sql select count(*) from $tb diff --git a/tests/script/tsim/parser/insert_tb.sim b/tests/script/tsim/parser/insert_tb.sim index 4fa04e0625ce53af1216d3d39d25ef6ef5403333..134ed723f16f145c8219e688cb0677c2f26c6776 100644 --- a/tests/script/tsim/parser/insert_tb.sim +++ b/tests/script/tsim/parser/insert_tb.sim @@ -99,7 +99,6 @@ if $rows != 1 then endi sql drop database $db -sleep 100 sql create database $db sql use $db sql create table stb1 (ts timestamp, c1 int) tags(t1 int) @@ -132,7 +131,6 @@ if $data21 != 1.000000000 then endi sql drop database $db -sleep 100 sql create database $db sql use $db sql create table stb (ts timestamp, c1 int, c2 bigint, c3 float, c4 double, c5 nchar(10), c6 binary(20)) tags(t1 int, t2 bigint, t3 double, t4 float, t5 nchar(10)) diff --git a/tests/script/tsim/parser/tbnameIn_query.sim b/tests/script/tsim/parser/tbnameIn_query.sim index 33587cb7c1aa2f709cf8228307c9a239776660ea..6bc40fa028fc79f8900aba985a63f47efac4c110 100644 --- a/tests/script/tsim/parser/tbnameIn_query.sim +++ b/tests/script/tsim/parser/tbnameIn_query.sim @@ -104,7 +104,7 @@ endi ## tbname in can accpet Upper case table name print select count(*), t1 from $stb where tbname in ('ti_tb0', 'TI_tb1', 'TI_TB2') group by t1 order by t1 sql select count(*), t1 from $stb where tbname in ('ti_tb0', 'TI_tb1', 'TI_TB2') group by t1 order by t1 -if $rows != 3 then +if $rows != 1 then return -1 endi if $data00 != 10 then @@ -113,18 +113,6 @@ endi if $data01 != 0 then return -1 endi -if $data10 != 10 then - return -1 -endi -if $data11 != 1 then - return -1 -endi -if $data20 != 10 then - return -1 -endi -if $data21 != 2 then - return -1 -endi # multiple tbname in is not allowed NOW sql select count(*), t1 from $stb where tbname in ('ti_tb1', 'ti_tb300') and tbname in ('ti_tb5', 'ti_tb1000') group by t1 order by t1 asc