From 22d9aef28494112ca8f094233354e04597bbdb2b Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Fri, 22 Jul 2022 11:27:59 +0800 Subject: [PATCH] test: set jira for case --- tests/script/jenkins/basic.txt | 93 ++++++++++---------- tests/script/tsim/parser/join.sim | 4 +- tests/script/tsim/parser/join_multivnode.sim | 59 ++----------- tests/script/tsim/parser/line_insert.sim | 50 ----------- tests/script/tsim/parser/sliding.sim | 3 + tests/script/tsim/tag/commit.sim | 2 +- 6 files changed, 61 insertions(+), 150 deletions(-) delete mode 100644 tests/script/tsim/parser/line_insert.sim diff --git a/tests/script/jenkins/basic.txt b/tests/script/jenkins/basic.txt index 3285414936..5fe653bcb5 100644 --- a/tests/script/jenkins/basic.txt +++ b/tests/script/jenkins/basic.txt @@ -27,7 +27,7 @@ ./test.sh -f tsim/db/delete_writing2.sim # unsupport ./test.sh -f tsim/db/dropdnodes.sim ./test.sh -f tsim/db/error1.sim -# jira ./test.sh -f tsim/db/keep.sim +# TD-17592 ./test.sh -f tsim/db/keep.sim ./test.sh -f tsim/db/len.sim ./test.sh -f tsim/db/repeat.sim ./test.sh -f tsim/db/show_create_db.sim @@ -87,83 +87,82 @@ ./test.sh -f tsim/parser/alter_column.sim ./test.sh -f tsim/parser/alter_stable.sim ./test.sh -f tsim/parser/alter.sim -# jira ./test.sh -f tsim/parser/alter1.sim +# ./test.sh -f tsim/parser/alter1.sim ./test.sh -f tsim/parser/auto_create_tb_drop_tb.sim ./test.sh -f tsim/parser/auto_create_tb.sim ./test.sh -f tsim/parser/between_and.sim ./test.sh -f tsim/parser/binary_escapeCharacter.sim -# jira ./test.sh -f tsim/parser/col_arithmetic_operation.sim -# jira ./test.sh -f tsim/parser/columnValue.sim +# ./test.sh -f tsim/parser/col_arithmetic_operation.sim +# ./test.sh -f tsim/parser/columnValue.sim ./test.sh -f tsim/parser/commit.sim -# jira ./test.sh -f tsim/parser/condition.sim +# TD-17661 ./test.sh -f tsim/parser/condition.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 +# TD-17653 ./test.sh -f tsim/parser/create_tb_with_tag_name.sim ./test.sh -f tsim/parser/create_tb.sim ./test.sh -f tsim/parser/dbtbnameValidate.sim ./test.sh -f tsim/parser/distinct.sim -# jira ./test.sh -f tsim/parser/fill_stb.sim +# TD-17623 ./test.sh -f tsim/parser/fill_stb.sim ./test.sh -f tsim/parser/fill_us.sim ./test.sh -f tsim/parser/fill.sim ./test.sh -f tsim/parser/first_last.sim ./test.sh -f tsim/parser/fourArithmetic-basic.sim -# jira ./test.sh -f tsim/parser/function.sim +# TD-17659 TD-17658 ./test.sh -f tsim/parser/function.sim ./test.sh -f tsim/parser/groupby-basic.sim -# jira ./test.sh -f tsim/parser/groupby.sim -# jira ./test.sh -f tsim/parser/having_child.sim -# jira ./test.sh -f tsim/parser/having.sim +# ./test.sh -f tsim/parser/groupby.sim +# TD-17622 ./test.sh -f tsim/parser/having_child.sim +# ./test.sh -f tsim/parser/having.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 +# TD-17663 ./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 -# jira ./test.sh -f tsim/parser/interp.sim +# ./test.sh -f tsim/parser/interp.sim ./test.sh -f tsim/parser/join_manyblocks.sim -## ./test.sh -f tsim/parser/join_multitables.sim -# ./test.sh -f tsim/parser/join_multivnode.sim -# jira ./test.sh -f tsim/parser/join.sim +# ./test.sh -f tsim/parser/join_multitables.sim +# TD-17713 ./test.sh -f tsim/parser/join_multivnode.sim +# TD-17707 ./test.sh -f tsim/parser/join.sim ./test.sh -f tsim/parser/last_cache.sim ./test.sh -f tsim/parser/last_groupby.sim -# jira ./test.sh -f tsim/parser/lastrow.sim +# TD-17675 ./test.sh -f tsim/parser/lastrow.sim ./test.sh -f tsim/parser/like.sim -# jira ./test.sh -f tsim/parser/limit.sim -# jira ./test.sh -f tsim/parser/limit1.sim -# jira ./test.sh -f tsim/parser/limit2.sim -# jira ./test.sh -f tsim/parser/line_insert.sim +# ./test.sh -f tsim/parser/limit.sim +# ./test.sh -f tsim/parser/limit1.sim +# ./test.sh -f tsim/parser/limit2.sim ./test.sh -f tsim/parser/mixed_blocks.sim ./test.sh -f tsim/parser/nchar.sim -# jira ./test.sh -f tsim/parser/nestquery.sim -# jira ./test.sh -f tsim/parser/null_char.sim +# TD-17703 ./test.sh -f tsim/parser/nestquery.sim +# ./test.sh -f tsim/parser/null_char.sim ./test.sh -f tsim/parser/precision_ns.sim ./test.sh -f tsim/parser/projection_limit_offset.sim ./test.sh -f tsim/parser/regex.sim ./test.sh -f tsim/parser/select_across_vnodes.sim ./test.sh -f tsim/parser/select_distinct_tag.sim ./test.sh -f tsim/parser/select_from_cache_disk.sim -# jira ./test.sh -f tsim/parser/select_with_tags.sim +# ./test.sh -f tsim/parser/select_with_tags.sim ./test.sh -f tsim/parser/selectResNum.sim -# jira ./test.sh -f tsim/parser/set_tag_vals.sim +# TD-17685 ./test.sh -f tsim/parser/set_tag_vals.sim ./test.sh -f tsim/parser/single_row_in_tb.sim -# jira ./test.sh -f tsim/parser/sliding.sim -# jira ./test.sh -f tsim/parser/slimit_alter_tags.sim -# jira ./test.sh -f tsim/parser/slimit.sim -# jira ./test.sh -f tsim/parser/slimit1.sim +# TD-17684 ./test.sh -f tsim/parser/sliding.sim +# ./test.sh -f tsim/parser/slimit_alter_tags.sim +# ./test.sh -f tsim/parser/slimit.sim +# ./test.sh -f tsim/parser/slimit1.sim ./test.sh -f tsim/parser/stableOp.sim -# jira ./test.sh -f tsim/parser/tags_dynamically_specifiy.sim -# jira ./test.sh -f tsim/parser/tags_filter.sim +# ./test.sh -f tsim/parser/tags_dynamically_specifiy.sim +# ./test.sh -f tsim/parser/tags_filter.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 -# jira ./test.sh -f tsim/parser/udf_dll_stable.sim -# jira ./test.sh -f tsim/parser/udf_dll.sim -# jira ./test.sh -f tsim/parser/udf.sim +# ./test.sh -f tsim/parser/udf_dll_stable.sim +# ./test.sh -f tsim/parser/udf_dll.sim +# ./test.sh -f tsim/parser/udf.sim ./test.sh -f tsim/parser/union.sim -# jira ./test.sh -f tsim/parser/union_sysinfo.sim -# jira ./test.sh -f tsim/parser/where.sim +# TD-17704 ./test.sh -f tsim/parser/union_sysinfo.sim +# ./test.sh -f tsim/parser/where.sim # ---- query ./test.sh -f tsim/query/interval.sim @@ -324,7 +323,7 @@ ./test.sh -f tsim/vnode/stable_replica3_vnode3.sim # --- sync -# jira ./test.sh -f tsim/sync/3Replica1VgElect.sim +# ./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 @@ -414,7 +413,7 @@ ./test.sh -f tsim/tag/3.sim ./test.sh -f tsim/tag/4.sim ./test.sh -f tsim/tag/5.sim -# jira ./test.sh -f tsim/tag/6.sim +# TD-17382 ./test.sh -f tsim/tag/6.sim ./test.sh -f tsim/tag/add.sim ./test.sh -f tsim/tag/bigint.sim ./test.sh -f tsim/tag/binary_binary.sim @@ -422,18 +421,18 @@ ./test.sh -f tsim/tag/bool_binary.sim ./test.sh -f tsim/tag/bool_int.sim ./test.sh -f tsim/tag/bool.sim -# jira ./test.sh -f tsim/tag/change.sim -# jira ./test.sh -f tsim/tag/column.sim -# jira ./test.sh -f tsim/tag/commit.sim -# jira ./test.sh -f tsim/tag/create.sim -# jira /test.sh -f tsim/tag/delete.sim -# jira ./test.sh -f tsim/tag/double.sim -# jira ./test.sh -f tsim/tag/filter.sim -# jira ./test.sh -f tsim/tag/float.sim +# ./test.sh -f tsim/tag/change.sim +# ./test.sh -f tsim/tag/column.sim +# ./test.sh -f tsim/tag/commit.sim +# ./test.sh -f tsim/tag/create.sim +# /test.sh -f tsim/tag/delete.sim +# ./test.sh -f tsim/tag/double.sim +# ./test.sh -f tsim/tag/filter.sim +# TD-17407 ./test.sh -f tsim/tag/float.sim ./test.sh -f tsim/tag/int_binary.sim ./test.sh -f tsim/tag/int_float.sim ./test.sh -f tsim/tag/int.sim -# jira ./test.sh -f tsim/tag/set.sim +# ./test.sh -f tsim/tag/set.sim ./test.sh -f tsim/tag/smallint.sim ./test.sh -f tsim/tag/tinyint.sim diff --git a/tests/script/tsim/parser/join.sim b/tests/script/tsim/parser/join.sim index fa03ad8214..c052e24856 100644 --- a/tests/script/tsim/parser/join.sim +++ b/tests/script/tsim/parser/join.sim @@ -247,7 +247,9 @@ if $rows != $val then return -1 endi -print 2 +#TODO +return + #===========================aggregation=================================== #select + where condition sql select count(join_tb1.*), count(join_tb0.*) from $tb1 , $tb2 where $ts1 = $ts2 and join_tb1.ts >= 100000 and join_tb0.c7 = false; diff --git a/tests/script/tsim/parser/join_multivnode.sim b/tests/script/tsim/parser/join_multivnode.sim index a204b4fcea..c33fa85fa2 100644 --- a/tests/script/tsim/parser/join_multivnode.sim +++ b/tests/script/tsim/parser/join_multivnode.sim @@ -3,8 +3,7 @@ system sh/deploy.sh -n dnode1 -i 1 system sh/exec.sh -n dnode1 -s start sql connect -$dbPrefix = join_m_db -$tbPrefix = join_tb +$dbPrefix = join_db $mtPrefix = join_mt $tbNum = 3 $rowNum = 1000 @@ -14,6 +13,7 @@ print =============== join_multivnode.sim $i = 0 $db = $dbPrefix . $i $mt = $mtPrefix . $i +$tbPrefix = $mt . _tb $tstart = 100000 @@ -54,14 +54,12 @@ while $i < $tbNum $tstart = 100000 endw -sleep 100 - $tstart = 100000 -$mt = $mtPrefix . 1 . $i +$mt = $mtPrefix . 1 sql create table $mt (ts timestamp, c1 int, c2 float, c3 bigint, c4 smallint, c5 tinyint, c6 double, c7 bool, c8 binary(10), c9 nchar(9)) TAGS(t1 int, t2 binary(12), t3 int) $i = 0 -$tbPrefix = join_1_tb +$tbPrefix = $mt . _tb while $i < $tbNum $tb = $tbPrefix . $i @@ -100,20 +98,19 @@ while $i < $tbNum endw print ===============multivnode projection join.sim - sql select join_mt0.ts,join_mt0.ts,join_mt0.t1 from join_mt0, join_mt1 where join_mt0.ts=join_mt1.ts and join_mt0.t1=join_mt1.t1; - -print $row +print ===> rows $row if $row != 3000 then print expect 3000, actual: $row return -1 endi -print ======= second tags join +# TODO +return +print ======= second tags join sql create table m1(ts timestamp, k int) tags(a binary(12), b int); sql create table m2(ts timestamp, k int) tags(a binary(12), b int); - sql insert into tm1 using m1 tags('tm1', 1) values(10000000, 1) tm2 using m2 tags('tm2', 1) values(10000000, 99); sql select * from m1,m2 where m1.ts=m2.ts and m1.b=m2.b; @@ -122,9 +119,7 @@ if $row != 1 then endi sql select join_mt0.ts, join_mt1.t1 from join_mt0, join_mt1 where join_mt0.ts=join_mt1.ts and join_mt0.t1=join_mt1.t1 - sql select join_mt0.ts, join_mt1.t1, join_mt0.t1, join_mt1.tbname, join_mt0.tbname from join_mt0, join_mt1 where join_mt0.ts=join_mt1.ts and join_mt0.t1=join_mt1.t1 - sql select join_mt0.ts, join_mt1.t1, join_mt0.t1, join_mt1.tbname, join_mt0.tbname from join_mt0, join_mt1 where join_mt0.ts=join_mt1.ts and join_mt0.t1=join_mt1.t1 limit 1 #1970-01-01 08:01:40.800 | 10 | 45.000000000 | 0 | true | false | 0 | @@ -135,63 +130,49 @@ sql select count(join_mt0.c1), sum(join_mt0.c2)/count(*), avg(c2), first(join_mt if $rows != 300 then return -1 endi - if $data00 != @70-01-01 08:01:40.990@ then print expect 70-01-01 08:01:40.990, actual: $data00 return -1 endi - if $data01 != 10 then return -1 endi - if $data02 != 94.500000000 then print expect 94.500000000, actual $data02 return -1 endi - if $data03 != 94.500000000 then return -1 endi - if $data04 != 90 then return -1 endi - if $data05 != 1 then return -1 endi - if $data06 != 0 then return -1 endi - if $data10 != @70-01-01 08:01:40.980@ then print expect 70-01-01 08:01:40.980, actual: $data10 return -1 endi - if $data11 != 10 then return -1 endi - if $data12 != 84.500000000 then print expect 84.500000000, actual $data12 return -1 endi - if $data13 != 84.500000000 then return -1 endi - if $data14 != 80 then return -1 endi - if $data15 != 1 then return -1 endi - if $data16 != 0 then return -1 endi @@ -264,100 +245,76 @@ sql select m1.ts,m1.tbname,m1.a, m2.ts,m2.tbname,m2.b from m1,m2 where m1.a=m2.b if $rows != 4 then return -1 endi - if $data00 != @20-01-01 01:01:01.000@ then print expect 20-01-01 01:01:01.000, actual:$data00 return -1 endi - if $data01 != @tm0@ then return -1 endi - if $data02 != 0 then return -1 endi - if $data03 != @20-01-01 01:01:01.000@ then return -1 endi - if $data04 != @t0@ then return -1 endi - if $data05 != 0 then return -1 endi - if $data10 != @20-01-01 01:01:01.000@ then return -1 endi - if $data11 != @tm1@ then return -1 endi - if $data12 != 1 then return -1 endi - if $data13 != @20-01-01 01:01:01.000@ then return -1 endi - if $data14 != @t4@ then return -1 endi - if $data15 != 1 then return -1 endi - if $data20 != @20-01-01 01:01:01.000@ then return -1 endi - if $data21 != @tm4@ then return -1 endi - if $data22 != 4 then return -1 endi - if $data23 != @20-01-01 01:01:01.000@ then return -1 endi - if $data24 != @t1@ then return -1 endi - if $data25 != 4 then return -1 endi - if $data30 != @20-01-01 01:01:01.000@ then return -1 endi - if $data31 != @tm5@ then return -1 endi - if $data32 != 5 then return -1 endi - if $data33 != @20-01-01 01:01:01.000@ then return -1 endi - if $data34 != @t5@ then return -1 endi - if $data35 != 5 then return -1 endi diff --git a/tests/script/tsim/parser/line_insert.sim b/tests/script/tsim/parser/line_insert.sim deleted file mode 100644 index fc522ecaa7..0000000000 --- a/tests/script/tsim/parser/line_insert.sim +++ /dev/null @@ -1,50 +0,0 @@ -system sh/stop_dnodes.sh -system sh/deploy.sh -n dnode1 -i 1 -system sh/exec.sh -n dnode1 -s start -sql connect - -print =============== step1 -$db = testlp -$mte = ste -$mt = st -sql drop database $db -x step1 -step1: -sql create database $db precision 'us' -sql use $db -sql create stable $mte (ts timestamp, f int) TAGS(t1 bigint) - -line_insert st,t1=3i64,t2=4f64,t3="t3" c1=3i64,c3=L"passit",c2=false,c4=4f64 1626006833639000000ns -line_insert st,t1=4i64,t3="t4",t2=5f64,t4=5f64 c1=3i64,c3=L"passitagin",c2=true,c4=5f64,c5=5f64 1626006833640000000ns -line_insert ste,t2=5f64,t3=L"ste" c1=true,c2=4i64,c3="iam" 1626056811823316532ns -line_insert stf,t1=4i64,t3="t4",t2=5f64,t4=5f64 c1=3i64,c3=L"passitagin",c2=true,c4=5f64,c5=5f64,c6=7u64 1626006933640000000ns -sql select * from st -if $rows != 2 then - return -1 -endi - -if $data00 != @21-07-11 20:33:53.639000@ then - return -1 -endi - -if $data02 != @passit@ then - return -1 -endi - -sql select * from stf -if $rows != 1 then - return -1 -endi - -sql select * from ste -if $rows != 1 then - return -1 -endi - -#print =============== clear -sql drop database $db -sql show databases -if $rows != 2 then - return -1 -endi - -system sh/exec.sh -n dnode1 -s stop -x SIGINT diff --git a/tests/script/tsim/parser/sliding.sim b/tests/script/tsim/parser/sliding.sim index b9353e2c61..6edab1f4a7 100644 --- a/tests/script/tsim/parser/sliding.sim +++ b/tests/script/tsim/parser/sliding.sim @@ -356,6 +356,9 @@ if $data03 != 0.000000000 then return -1 endi +#TODO +return + sql select count(c2),last(c4),stddev(c3),spread(c3) from sliding_tb0 where c2 = 0 interval(30s) sliding(20s) order by _wstart desc limit 1 offset 15; if $row != 1 then return -1 diff --git a/tests/script/tsim/tag/commit.sim b/tests/script/tsim/tag/commit.sim index 18128fc464..95ab2dbc7f 100644 --- a/tests/script/tsim/tag/commit.sim +++ b/tests/script/tsim/tag/commit.sim @@ -241,7 +241,7 @@ if $data04 != 3 then return -1 endi -sql alter table $mt change tag tgcol1 tgcol4 +sql alter table $mt rename tag tgcol1 tgcol4 sql alter table $mt drop tag tgcol2 sql alter table $mt drop tag tgcol3 sql alter table $mt add tag tgcol5 binary(10) -- GitLab