diff --git a/tests/script/tsim/stream/basic0.sim b/tests/script/tsim/stream/basic0.sim index 5a99aadf36..1661904c98 100644 --- a/tests/script/tsim/stream/basic0.sim +++ b/tests/script/tsim/stream/basic0.sim @@ -37,6 +37,8 @@ sleep 1000 sql create stream s1 trigger at_once into outstb as select _wstart, min(k), max(k), sum(k) as sum_alias from ct1 interval(10m) +run tsim/stream/checkTaskStatus.sim + sql show stables if $rows != 2 then return -1 diff --git a/tests/script/tsim/stream/basic1.sim b/tests/script/tsim/stream/basic1.sim index 4b5377d928..0d89f528d1 100644 --- a/tests/script/tsim/stream/basic1.sim +++ b/tests/script/tsim/stream/basic1.sim @@ -18,6 +18,9 @@ sql use test; sql create table t1(ts timestamp, a int, b int , c int, d double); sql create stream streams1 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt as select _wstart, count(*) c1, count(d) c2 , sum(a) c3 , max(b) c4, min(c) c5 from t1 interval(10s); + +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791213000,1,2,3,1.0); sql insert into t1 values(1648791223001,2,2,3,1.1); sql insert into t1 values(1648791233002,3,2,3,2.1); @@ -548,6 +551,8 @@ sql create table t5 using st tags(2,2,2); sql create stream streams2 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt as select _wstart, count(*) c1, sum(a) c3,max(b) c4 from st partition by tbname interval(10s); sql create stream streams3 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt3 as select _wstart, count(*) c1, sum(a) c3,max(b) c4, now c5 from st partition by tbname interval(10s); +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791213000,1,1,1,1.0) t2 values(1648791213000,2,2,2,2.0) t3 values(1648791213000,3,3,3,3.0) t4 values(1648791213000,4,4,4,4.0); $loop_count = 0 @@ -669,6 +674,8 @@ sql create stable st(ts timestamp, a int, b int , c int) tags(ta int,tb int,tc i sql create table ts1 using st tags(1,1,1); sql create stream stream_t3 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamtST3 as select ts, min(a) c6, a, b, c, ta, tb, tc from ts1 interval(10s) ; +run tsim/stream/checkTaskStatus.sim + sql insert into ts1 values(1648791211000,1,2,3); sleep 50 sql insert into ts1 values(1648791222001,2,2,3); @@ -702,6 +709,9 @@ sql create database test4 vgroups 1; sql use test4; sql create table t1(ts timestamp, a int, b int , c int, d double); sql create stream streams4 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt__4 as select _wstart, count(*) c1 from t1 where a > 5 interval(10s); + +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791213000,1,2,3,1.0); $loop_count = 0 @@ -800,6 +810,8 @@ sql create table ts1 using st tags(1,1,1); sql create stream streams5 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt5 as select count(*), _wstart, _wend, max(a) from ts1 interval(10s) ; sql create stream streams6 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt6 as select count(*), _wstart, _wend, max(a), _wstart as ts from ts1 interval(10s) ; +run tsim/stream/checkTaskStatus.sim + sql_error create stream streams7 trigger at_once into streamt7 as select _wstart, count(*), _wstart, _wend, max(a) from ts1 interval(10s) ; sql_error create stream streams8 trigger at_once into streamt8 as select count(*), _wstart, _wstart, _wend, max(a) from ts1 interval(10s) ; sql_error create stream streams9 trigger at_once into streamt9 as select _wstart as ts, count(*), _wstart as ts, _wend, max(a) from ts1 interval(10s) ; @@ -842,6 +854,8 @@ sql create stable st(ts timestamp, a int, b int , c int) tags(ta int,tb int,tc i sql create table ts1 using st tags(1,1,1); sql create stream streams7 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt7 as select _wstart, count(*) from ts1 interval(10s) ; +run tsim/stream/checkTaskStatus.sim + sql insert into ts1 values(1648791211000,1,2,3); sql_error insert into ts1 values(-1648791211000,1,2,3); diff --git a/tests/script/tsim/stream/basic2.sim b/tests/script/tsim/stream/basic2.sim index 0ad82b8b05..ad655f2d16 100644 --- a/tests/script/tsim/stream/basic2.sim +++ b/tests/script/tsim/stream/basic2.sim @@ -35,6 +35,8 @@ endi sql create stream s1 trigger at_once into outstb as select _wstart, min(k), max(k), sum(k) as sum_alias from ct1 interval(10m) +run tsim/stream/checkTaskStatus.sim + sql show stables if $rows != 2 then return -1 diff --git a/tests/script/tsim/stream/basic3.sim b/tests/script/tsim/stream/basic3.sim index f18061a6df..010578d4d2 100644 --- a/tests/script/tsim/stream/basic3.sim +++ b/tests/script/tsim/stream/basic3.sim @@ -28,6 +28,7 @@ sql create stream streamd4 into streamt4 as select tbname, _wstart,_wend, count( sql create stream streamd5 into streamt5 as select tbname, _wstart,_wend, count(*), max(ca), min(cb) from st where time > "2022-01-01 00:00:00" and time < "2032-01-01 00:00:00" partition by tbname state_window(cc); sql create stream streamd6 into streamt6 as select ca, _wstart,_wend, count(*), max(ca), min(cb) from t1 where time > "2022-01-01 00:00:00" and time < "2032-01-01 00:00:00" partition by ca state_window(cc); +run tsim/stream/checkTaskStatus.sim sql alter local 'keepColumnName' '1' sql CREATE STABLE `meters_test_data` (`ts` TIMESTAMP, `close` FLOAT, `parttime` TIMESTAMP, `parttime_str` VARCHAR(32)) TAGS (`id` VARCHAR(32)); diff --git a/tests/script/tsim/stream/basic4.sim b/tests/script/tsim/stream/basic4.sim index d2bf321ad5..8868c3fd60 100644 --- a/tests/script/tsim/stream/basic4.sim +++ b/tests/script/tsim/stream/basic4.sim @@ -15,6 +15,8 @@ sql use test; sql create table t1(ts timestamp, a int, b int , c int, d double); sql create stream streams0 trigger at_once ignore expired 0 ignore update 0 into streamt as select _wstart, count(*) c1 from t1 interval(1s); +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791211000,1,2,3,1.0); sql insert into t1 values(1648791212001,2,2,3,1.1); sql insert into t1 values(1648791213002,3,2,3,2.1); @@ -80,7 +82,8 @@ sql use test2; sql create stable st(ts timestamp, a int, b int , c int, d double) tags(ta int,tb int,tc int); sql create table t1 using st tags(1,1,1); sql create stream streams2 trigger at_once ignore expired 0 ignore update 0 waterMark 200s into streamt2 as select _wstart, count(*) c1 from t1 interval(1s); -sleep 1000 + +run tsim/stream/checkTaskStatus.sim sql insert into t1 values(1648791211000,1,2,3,1.0); sql insert into t1 values(1648791212001,2,2,3,1.1); @@ -147,6 +150,8 @@ sql use test1; sql create table t1(ts timestamp, a int, b int , c int, d double); sql create stream streams1 trigger at_once ignore expired 0 ignore update 0 into streamt1 as select _wstart, count(*) c1 from t1 session(ts, 1s); +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791211000,1,2,3,1.0); sql insert into t1 values(1648791213000,1,2,3,1.1); sql insert into t1 values(1648791215000,1,2,3,1.1); diff --git a/tests/script/tsim/stream/basic5.sim b/tests/script/tsim/stream/basic5.sim index 7b5f587feb..d7dd603d3c 100644 --- a/tests/script/tsim/stream/basic5.sim +++ b/tests/script/tsim/stream/basic5.sim @@ -15,7 +15,7 @@ sql use test3; sql create table t1(ts timestamp, a int, b int , c int, d double); sql create stream streams3 trigger at_once ignore expired 0 ignore update 0 into streamt3 as select _wstart, count(*) c1 from t1 state_window(a); -sleep 1000 +run tsim/stream/checkTaskStatus.sim sql insert into t1 values(1648791211000,1,2,3,1.0); sql insert into t1 values(1648791213000,2,2,3,1.1); @@ -225,7 +225,7 @@ sql create table t1 using st tags(1,1,1); sql create table t2 using st tags(2,2,2); sql create stream streams4 trigger at_once ignore expired 0 ignore update 0 into streamt4 as select _wstart, first(a), b, c, ta, tb from st interval(1s); -sleep 1000 +run tsim/stream/checkTaskStatus.sim sql insert into t1 values(1648791211000,1,2,3,1.0); sql insert into t1 values(1648791213000,2,3,4,1.1); @@ -301,7 +301,7 @@ sql create table t1 using st tags(1,1,1); sql create table t2 using st tags(2,2,2); sql create stream streams5 trigger at_once ignore expired 0 ignore update 0 into streamt5 as select _wstart, b, c, ta, tb, max(b) from t1 interval(1s); -sleep 1000 +run tsim/stream/checkTaskStatus.sim sql insert into t1 values(1648791211000,1,2,3,1.0); sql insert into t1 values(1648791213000,2,3,4,1.1); @@ -382,7 +382,7 @@ sql create stream streams9 trigger at_once ignore expired 0 ignore update 0 into sql create stream streams10 trigger at_once ignore expired 0 ignore update 0 into streamt10 as select ts, b, c, last(c), ta, tb from st partition by tbname event_window start with d = 0 end with d = 9; sql create stream streams11 trigger at_once ignore expired 1 ignore update 0 watermark 100s into streamt11 as select ts, b, c, last(c), ta, tb from st partition by tbname count_window(2); -sleep 1000 +run tsim/stream/checkTaskStatus.sim sql insert into t1 values(1648791211000,1,2,3,0); sql insert into t1 values(1648791213000,2,3,4,0); diff --git a/tests/script/tsim/stream/checkStreamSTable.sim b/tests/script/tsim/stream/checkStreamSTable.sim index 873fb3f060..d3fc77fbf0 100644 --- a/tests/script/tsim/stream/checkStreamSTable.sim +++ b/tests/script/tsim/stream/checkStreamSTable.sim @@ -22,7 +22,8 @@ sql create table t2 using st tags(2,2,2); sql create stable result.streamt0(ts timestamp,a int,b int) tags(ta int,tb varchar(100),tc int); sql create stream streams0 trigger at_once into result.streamt0 tags(tb) as select _wstart, count(*) c1, max(a) c2 from st partition by tbname tb interval(10s); -sleep 500 + +run tsim/stream/checkTaskStatus.sim sql insert into t1 values(1648791213000,1,2,3); sql insert into t2 values(1648791213000,2,2,3); @@ -108,7 +109,8 @@ sql create table t2 using st tags(2,2,2); sql create stable result1.streamt1(ts timestamp,a int,b int,c int) tags(ta varchar(100),tb int,tc int); sql create stream streams1 trigger at_once into result1.streamt1(ts,c,a,b) tags(ta) as select _wstart, count(*) c1, max(a),min(b) c2 from st partition by tbname as ta interval(10s); -sleep 500 + +run tsim/stream/checkTaskStatus.sim sql insert into t1 values(1648791213000,10,20,30); sql insert into t2 values(1648791213000,40,50,60); @@ -198,7 +200,8 @@ sql_error create stream streams2 trigger at_once into result2.streamt2 as selec # column dest 3, source 2 sql create stream streams2 trigger at_once into result2.streamt2(ts, a) tags(ta) as select _wstart, count(*) c1 from st partition by tbname as ta interval(10s); -sleep 500 + +run tsim/stream/checkTaskStatus.sim print ===== step5 @@ -215,7 +218,8 @@ sql create table t2 using st tags(4,5,6); sql create stable result3.streamt3(ts timestamp,a int,b int,c int, d int) tags(ta int,tb int,tc int); sql create stream streams3 trigger at_once into result3.streamt3(ts,c,a,b) as select _wstart, count(*) c1, max(a),min(b) c2 from st interval(10s); -sleep 500 + +run tsim/stream/checkTaskStatus.sim sql insert into t1 values(1648791213000,10,20,30); sql insert into t2 values(1648791213000,40,50,60); @@ -295,7 +299,8 @@ sql create table t2 using st tags(4,5,6); sql create stable result4.streamt4(ts timestamp,a int,b int,c int, d int) tags(tg1 int,tg2 int,tg3 int); sql create stream streams4 trigger at_once into result4.streamt4(ts,c,a,b) tags(tg2, tg3, tg1) subtable( concat("tbl-", cast(tg1 as varchar(10)) ) ) as select _wstart, count(*) c1, max(a),min(b) c2 from st partition by ta+1 as tg1, cast(tb as bigint) as tg2, tc as tg3 interval(10s); -sleep 500 + +run tsim/stream/checkTaskStatus.sim sql insert into t1 values(1648791213000,10,20,30); sql insert into t2 values(1648791213000,40,50,60); @@ -380,7 +385,8 @@ sql create table t2 using st tags(4,5,6); sql create stable result5.streamt5(ts timestamp,a int,b int,c int, d int) tags(tg1 int,tg2 int,tg3 int); sql create stream streams5 trigger at_once into result5.streamt5(ts,c,a,b) tags(tg2, tg3, tg1) subtable( concat("tbl-", cast(tg3 as varchar(10)) ) ) as select _wstart, count(*) c1, max(a),min(b) c2 from st partition by ta+1 as tg1, cast(tb as bigint) as tg2, a as tg3 session(ts, 10s); -sleep 500 + +run tsim/stream/checkTaskStatus.sim sql insert into t1 values(1648791213000,NULL,NULL,NULL); @@ -465,7 +471,8 @@ sql create stream streams8 trigger at_once into streamt8 as select _wstart as sql drop stream streams8; sql create stream streams71 trigger at_once into streamt8(ts, c2) tags(group_id)as select _wstart, count(*) from t1 partition by tbname as group_id interval(10s); -sleep 500 + +run tsim/stream/checkTaskStatus.sim sql insert into t1 values(1648791233000,1,2,3,1.0); diff --git a/tests/script/tsim/stream/checkStreamSTable1.sim b/tests/script/tsim/stream/checkStreamSTable1.sim index b25e582104..94991f72d9 100644 --- a/tests/script/tsim/stream/checkStreamSTable1.sim +++ b/tests/script/tsim/stream/checkStreamSTable1.sim @@ -16,36 +16,8 @@ sql create table t1 using st tags(1,1,1); sql create table t2 using st tags(2,2,2); sql create stream streams1 trigger at_once into streamt1 as select _wstart, count(*) c1, count(a) c2 from st interval(1s) ; -print ====check task status start +run tsim/stream/checkTaskStatus.sim -$loop_count = 0 - -loopCheck: - -sleep 1000 - -$loop_count = $loop_count + 1 -if $loop_count == 30 then - return -1 -endi - -print 1 select * from information_schema.ins_stream_tasks; -sql select * from information_schema.ins_stream_tasks; - -if $rows == 0 then - print rows=$rows - goto loopCheck -endi - -print 1 select * from information_schema.ins_stream_tasks where status != "ready"; -sql select * from information_schema.ins_stream_tasks where status != "ready"; - -if $rows != 0 then - print rows=$rows - goto loopCheck -endi - -print ====check task status end sql insert into t1 values(1648791211000,1,2,3); sql insert into t1 values(1648791212000,2,2,3); @@ -77,36 +49,8 @@ sql alter table streamt1 add column c3 double; print create stream streams1 trigger at_once into streamt1 as select _wstart, count(*) c1, count(a) c2, avg(b) c3 from st interval(1s) ; sql create stream streams1 trigger at_once into streamt1 as select _wstart, count(*) c1, count(a) c2, avg(b) c3 from st interval(1s) ; -print ====check task status start +run tsim/stream/checkTaskStatus.sim -$loop_count = 0 - -loopCheck1: - -sleep 1000 - -$loop_count = $loop_count + 1 -if $loop_count == 30 then - return -1 -endi - -print 1 select * from information_schema.ins_stream_tasks; -sql select * from information_schema.ins_stream_tasks; - -if $rows == 0 then - print rows=$rows - goto loopCheck1 -endi - -print 1 select * from information_schema.ins_stream_tasks where status != "ready"; -sql select * from information_schema.ins_stream_tasks where status != "ready"; - -if $rows != 0 then - print rows=$rows - goto loopCheck1 -endi - -print ====check task status end sql insert into t2 values(1648791213000,1,2,3); sql insert into t1 values(1648791214000,1,2,3); diff --git a/tests/script/tsim/stream/checkpointInterval0.sim b/tests/script/tsim/stream/checkpointInterval0.sim index 1c212eb2a7..a548f05c82 100644 --- a/tests/script/tsim/stream/checkpointInterval0.sim +++ b/tests/script/tsim/stream/checkpointInterval0.sim @@ -15,6 +15,9 @@ sql use test; sql create table t1(ts timestamp, a int, b int , c int, d double); sql create stream streams0 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt as select _wstart, count(*) c1, sum(a) from t1 interval(10s); sql create stream streams1 trigger window_close IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt1 as select _wstart, count(*) c1, sum(a) from t1 interval(10s); + +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791213000,1,2,3,1.0); sql insert into t1 values(1648791213001,2,2,3,1.1); diff --git a/tests/script/tsim/stream/checkpointInterval1.sim b/tests/script/tsim/stream/checkpointInterval1.sim index 36f361ad64..c7426411cd 100644 --- a/tests/script/tsim/stream/checkpointInterval1.sim +++ b/tests/script/tsim/stream/checkpointInterval1.sim @@ -15,7 +15,7 @@ sql create table t1 using st tags(1,1,1); sql create table t2 using st tags(2,2,2); sql create stream streams0 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt as select _wstart, count(*) c1, sum(a) from st interval(10s); -sleep 1000 +run tsim/stream/checkTaskStatus.sim sql insert into t1 values(1648791213000,1,2,3,1.0); @@ -59,6 +59,8 @@ system sh/stop_dnodes.sh system sh/exec.sh -n dnode1 -s start +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791213002,3,2,3,1.1); sql insert into t2 values(1648791223003,4,2,3,1.1); diff --git a/tests/script/tsim/stream/checkpointSession0.sim b/tests/script/tsim/stream/checkpointSession0.sim index 1d503806c5..c5e1cecf93 100644 --- a/tests/script/tsim/stream/checkpointSession0.sim +++ b/tests/script/tsim/stream/checkpointSession0.sim @@ -14,6 +14,9 @@ sql use test; sql create table t1(ts timestamp, a int, b int , c int, d double); sql create stream streams0 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt as select _wstart, count(*) c1, sum(a) from t1 session(ts, 10s); + +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791213000,1,2,3,1.0); sql insert into t1 values(1648791213001,2,2,3,1.1); diff --git a/tests/script/tsim/stream/checkpointSession1.sim b/tests/script/tsim/stream/checkpointSession1.sim index 9720803145..0427585122 100644 --- a/tests/script/tsim/stream/checkpointSession1.sim +++ b/tests/script/tsim/stream/checkpointSession1.sim @@ -15,7 +15,8 @@ sql create table t1 using st tags(1,1,1); sql create table t2 using st tags(2,2,2); sql create stream streams0 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt as select _wstart, count(*) c1, sum(a) from st session(ts, 10s); -sleep 1000 +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791213000,1,2,3,1.0); diff --git a/tests/script/tsim/stream/checkpointState0.sim b/tests/script/tsim/stream/checkpointState0.sim index 3836721212..f81486e3b9 100644 --- a/tests/script/tsim/stream/checkpointState0.sim +++ b/tests/script/tsim/stream/checkpointState0.sim @@ -14,6 +14,9 @@ sql use test; sql create table t1(ts timestamp, a int, b int , c int, d double); sql create stream streams0 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt as select _wstart, count(*) c1, sum(a) from t1 state_window(b); + +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791213000,1,2,3,1.0); sql insert into t1 values(1648791213001,2,2,3,1.1); diff --git a/tests/script/tsim/stream/count0.sim b/tests/script/tsim/stream/count0.sim index 5f5ec72275..b392363533 100644 --- a/tests/script/tsim/stream/count0.sim +++ b/tests/script/tsim/stream/count0.sim @@ -11,7 +11,9 @@ sql use test; sql create table t1(ts timestamp, a int, b int , c int, d double); sql create stream streams1 trigger at_once IGNORE EXPIRED 1 IGNORE UPDATE 0 WATERMARK 100s into streamt as select _wstart as s, count(*) c1, sum(b), max(c) from t1 count_window(3); -sleep 1000 + +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791213000,0,1,1,1.0); sql insert into t1 values(1648791213001,9,2,2,1.1); @@ -80,7 +82,9 @@ sql create stable st(ts timestamp, a int, b int , c int, d double) tags(ta int,t sql create table t1 using st tags(1,1,1); sql create table t2 using st tags(2,2,2); sql create stream streams2 trigger at_once IGNORE EXPIRED 1 IGNORE UPDATE 0 WATERMARK 100s into streamt2 as select _wstart as s, count(*) c1, sum(b), max(c) from st partition by tbname count_window(3) -sleep 1000 + +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791213000,0,1,1,1.0); sql insert into t1 values(1648791213001,9,2,2,1.1); @@ -192,7 +196,9 @@ sql insert into t1 values(1648791213009,0,3,3,1.0); sleep 500 sql create stream streams3 trigger at_once FILL_HISTORY 1 IGNORE EXPIRED 1 IGNORE UPDATE 0 WATERMARK 100s into streamt3 as select _wstart as s, count(*) c1, sum(b), max(c) from t1 count_window(3); -sleep 1000 + +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791223000,0,1,1,1.0); sql insert into t1 values(1648791223001,9,2,2,1.1); diff --git a/tests/script/tsim/stream/count2.sim b/tests/script/tsim/stream/count2.sim index 2558bd1072..3a413442a5 100644 --- a/tests/script/tsim/stream/count2.sim +++ b/tests/script/tsim/stream/count2.sim @@ -11,7 +11,9 @@ sql use test; sql create table t1(ts timestamp, a int, b int , c int, d double); sql create stream streams1 trigger at_once IGNORE EXPIRED 1 IGNORE UPDATE 0 WATERMARK 100s into streamt as select _wstart as s, count(*) c1, sum(b), max(c) from t1 count_window(3); -sleep 1000 + +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791213001,9,2,2,1.1); sql insert into t1 values(1648791213009,0,3,3,1.0); @@ -140,7 +142,9 @@ sql create stable st(ts timestamp, a int, b int , c int, d double) tags(ta int,t sql create table t1 using st tags(1,1,1); sql create table t2 using st tags(2,2,2); sql create stream streams2 trigger at_once IGNORE EXPIRED 1 IGNORE UPDATE 0 WATERMARK 100s into streamt2 as select _wstart as s, count(*) c1, sum(b), max(c) from st partition by tbname count_window(3) -sleep 1000 + +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791213001,9,2,2,1.1); diff --git a/tests/script/tsim/stream/count3.sim b/tests/script/tsim/stream/count3.sim index f04996cdaa..c034bd6495 100644 --- a/tests/script/tsim/stream/count3.sim +++ b/tests/script/tsim/stream/count3.sim @@ -11,7 +11,9 @@ sql use test; sql create table t1(ts timestamp, a int, b int , c int, d double); sql create stream streams1 trigger at_once IGNORE EXPIRED 1 IGNORE UPDATE 0 WATERMARK 100s into streamt as select _wstart as s, count(*) c1, sum(b), max(c) from t1 count_window(3); -sleep 1000 + +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791213000,0,1,1,1.0); sql insert into t1 values(1648791213001,9,2,2,1.1); diff --git a/tests/script/tsim/stream/countSliding0.sim b/tests/script/tsim/stream/countSliding0.sim index 82c54649b2..794a8ce347 100644 --- a/tests/script/tsim/stream/countSliding0.sim +++ b/tests/script/tsim/stream/countSliding0.sim @@ -11,7 +11,9 @@ sql use test; sql create table t1(ts timestamp, a int, b int , c int, d double); sql create stream streams1 trigger at_once IGNORE EXPIRED 1 IGNORE UPDATE 0 WATERMARK 100s into streamt as select _wstart as s, count(*) c1, sum(b), max(c) from t1 count_window(4, 2); -sleep 1000 + +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791213000,0,1,1,1.0); sleep 100 @@ -241,7 +243,9 @@ sql create stable st(ts timestamp, a int, b int , c int, d double) tags(ta int,t sql create table t1 using st tags(1,1,1); sql create table t2 using st tags(2,2,2); sql create stream streams2 trigger at_once IGNORE EXPIRED 1 IGNORE UPDATE 0 WATERMARK 100s into streamt2 as select _wstart as s, count(*) c1, sum(b), max(c) from st partition by tbname count_window(4, 2); -sleep 1000 + +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791213000,0,1,1,1.0); sleep 100 diff --git a/tests/script/tsim/stream/countSliding1.sim b/tests/script/tsim/stream/countSliding1.sim index 6759ab7abd..43f5a44cb6 100644 --- a/tests/script/tsim/stream/countSliding1.sim +++ b/tests/script/tsim/stream/countSliding1.sim @@ -11,7 +11,9 @@ sql use test; sql create table t1(ts timestamp, a int, b int , c int, d double); sql create stream streams1 trigger at_once IGNORE EXPIRED 1 IGNORE UPDATE 0 WATERMARK 100s into streamt as select _wstart as s, count(*) c1, sum(b), max(c) from t1 count_window(4, 2); -sleep 1000 + +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791213000,0,1,1,1.0); sleep 100 diff --git a/tests/script/tsim/stream/countSliding2.sim b/tests/script/tsim/stream/countSliding2.sim index 8841283c81..6c6a51ac76 100644 --- a/tests/script/tsim/stream/countSliding2.sim +++ b/tests/script/tsim/stream/countSliding2.sim @@ -11,7 +11,9 @@ sql use test; sql create table t1(ts timestamp, a int, b int , c int, d double); sql create stream streams1 trigger at_once IGNORE EXPIRED 1 IGNORE UPDATE 0 WATERMARK 100s into streamt as select _wstart as s, count(*) c1, sum(b), max(c) from t1 count_window(4, 2); -sleep 1000 + +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791213000,0,1,1,1.0); sleep 100 diff --git a/tests/script/tsim/stream/deleteInterval.sim b/tests/script/tsim/stream/deleteInterval.sim index 11e5ee39d2..9fa706d188 100644 --- a/tests/script/tsim/stream/deleteInterval.sim +++ b/tests/script/tsim/stream/deleteInterval.sim @@ -17,7 +17,9 @@ sql create database test vgroups 1; sql use test; sql create table t1(ts timestamp, a int, b int , c int, d double); sql create stream streams0 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt as select _wstart c1, count(*) c2, max(a) c3 from t1 interval(10s); -sleep 500 + +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791213000,NULL,NULL,NULL,NULL); sleep 1000 @@ -195,7 +197,9 @@ sql create stable st(ts timestamp, a int, b int, c int, d double) tags(ta int,tb sql create table t1 using st tags(1,1,1); sql create table t2 using st tags(2,2,2); sql create stream streams2 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into test.streamt2 as select _wstart c1, count(*) c2, max(a) c3 from st interval(10s); -sleep 500 + +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791213000,NULL,NULL,NULL,NULL); sql insert into t2 values(1648791213000,NULL,NULL,NULL,NULL); @@ -422,7 +426,9 @@ sql create stable st(ts timestamp, a int, b int, c int, d double) tags(ta int,tb sql create table t1 using st tags(1,1,1); sql create table t2 using st tags(2,2,2); sql create stream streams3 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into test.streamt3 as select _wstart c1, count(*) c2, max(a) c3 from st interval(10s); -sleep 500 + +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791213000,NULL,NULL,NULL,NULL); sql insert into t2 values(1648791213000,NULL,NULL,NULL,NULL); diff --git a/tests/script/tsim/stream/deleteScalar.sim b/tests/script/tsim/stream/deleteScalar.sim index 9a634a5c2d..45ebacba84 100644 --- a/tests/script/tsim/stream/deleteScalar.sim +++ b/tests/script/tsim/stream/deleteScalar.sim @@ -10,7 +10,8 @@ sql use test; sql create table t1(ts timestamp, a int, b int , c int, d double); sql create stream streams0 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt as select ts, a, b from t1 partition by a; -sleep 1000 +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791213000,0,2,3,1.0); sql insert into t1 values(1648791213001,1,2,3,1.0); @@ -94,7 +95,8 @@ sql use test1; sql create table t1(ts timestamp, a int, b int , c int, d double); sql create stream streams1 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt1 subtable(concat("aaa-", cast( a as varchar(10) ))) as select ts, a, b from t1 partition by a; -sleep 1000 +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791213000,0,2,3,1.0); sql insert into t1 values(1648791213001,1,2,3,1.0); @@ -178,7 +180,8 @@ sql use test2; sql create table t1(ts timestamp, a int, b int , c int, d double); sql create stream streams2 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt2 subtable("aaa-a") as select ts, a, b from t1; -sleep 1000 +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791213000,0,2,3,1.0); sql insert into t1 values(1648791213001,1,2,3,1.0); diff --git a/tests/script/tsim/stream/deleteSession.sim b/tests/script/tsim/stream/deleteSession.sim index 18ff56ee3b..cdb43c7672 100644 --- a/tests/script/tsim/stream/deleteSession.sim +++ b/tests/script/tsim/stream/deleteSession.sim @@ -18,7 +18,8 @@ sql use test; sql create table t1(ts timestamp, a int, b int , c int, d double); sql create stream streams0 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt as select _wstart c1, count(*) c2, max(a) c3 from t1 session(ts, 5s); -sleep 2000 +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791213000,NULL,NULL,NULL,NULL); sleep 1000 @@ -195,7 +196,8 @@ sql create table t1 using st tags(1,1,1); sql create table t2 using st tags(2,2,2); sql create stream streams2 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into test.streamt2 as select _wstart c1, count(*) c2, max(a) c3 from st session(ts,5s); -sleep 2000 +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791213000,NULL,NULL,NULL,NULL); sql insert into t2 values(1648791213000,NULL,NULL,NULL,NULL); @@ -426,7 +428,9 @@ sql create stable st(ts timestamp, a int, b int, c int, d double) tags(ta int,tb sql create table t1 using st tags(1,1,1); sql create table t2 using st tags(2,2,2); sql create stream streams3 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into test.streamt3 as select _wstart c1, count(*) c2, max(a) c3 from st session(ts,5s); -sleep 2000 + +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791210000,1,1,1,NULL); sql insert into t1 values(1648791210001,2,2,2,NULL); @@ -538,7 +542,9 @@ sql create table t2 using st tags(2,2,2); print create stream streams4 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt4 as select _wstart, count(*) c1 from st partition by tbname session(ts, 2s); sql create stream streams4 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt4 as select _wstart, count(*) c1 from st partition by tbname session(ts, 2s); -sleep 1000 + +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791210000,1,2,3); sql insert into t1 values(1648791220000,2,2,3); diff --git a/tests/script/tsim/stream/deleteState.sim b/tests/script/tsim/stream/deleteState.sim index 8ca5e0d507..04c57c6483 100644 --- a/tests/script/tsim/stream/deleteState.sim +++ b/tests/script/tsim/stream/deleteState.sim @@ -18,6 +18,8 @@ sql use test; sql create table t1(ts timestamp, a int, b int , c int, d double); sql create stream streams0 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt as select _wstart c1, count(*) c2, max(b) c3 from t1 state_window(a); +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791213000,NULL,NULL,NULL,NULL); sleep 1000 sql delete from t1 where ts = 1648791213000; @@ -195,6 +197,8 @@ sql create table t2 using st tags(2,2,2); print create stream streams4 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt4 as select _wstart, count(*) c1 from st partition by tbname state_window(c); sql create stream streams4 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt4 as select _wstart, count(*) c1 from st partition by tbname state_window(c); +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791210000,1,2,1); sql insert into t1 values(1648791220000,2,2,2); sql insert into t1 values(1648791221000,2,2,2); diff --git a/tests/script/tsim/stream/distributeInterval0.sim b/tests/script/tsim/stream/distributeInterval0.sim index cc8b7227d7..7f206b78d8 100644 --- a/tests/script/tsim/stream/distributeInterval0.sim +++ b/tests/script/tsim/stream/distributeInterval0.sim @@ -19,7 +19,8 @@ sql create table ts3 using st tags(3,2,2); sql create table ts4 using st tags(4,2,2); sql create stream stream_t1 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 watermark 1d into streamtST1 as select _wstart, count(*) c1, count(d) c2 , sum(a) c3 , max(b) c4, min(c) c5 from st interval(10s); -sleep 1000 +run tsim/stream/checkTaskStatus.sim + sql insert into ts1 values(1648791213001,1,12,3,1.0); sql insert into ts2 values(1648791213001,1,12,3,1.0); @@ -439,7 +440,8 @@ sql create table ts1 using st tags(1,1,1); sql create table ts2 using st tags(2,2,2); sql create stream stream_t2 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 watermark 20s into streamtST1 as select _wstart, count(*) c1, count(a) c2 , sum(a) c3 , max(b) c5, min(c) c6 from st interval(10s) ; -sleep 2000 +run tsim/stream/checkTaskStatus.sim + sql insert into ts1 values(1648791211000,1,2,3); sql insert into ts1 values(1648791222001,2,2,3); sql insert into ts2 values(1648791211000,1,2,3); @@ -475,7 +477,8 @@ sql create table ts1 using st tags(1,1,1); sql create table ts2 using st tags(2,2,2); sql create stream stream_t3 trigger at_once into streamtST3 as select ts, min(a) c6, a, b, c, ta, tb, tc from st interval(10s) ; -sleep 1000 +run tsim/stream/checkTaskStatus.sim + sql insert into ts1 values(1648791211000,1,2,3); sleep 50 @@ -527,6 +530,8 @@ sql create table ddd using st tags(4,2,2); sql create stream streams1 IGNORE EXPIRED 0 IGNORE UPDATE 0 fill_history 0 watermark 3s into streamst subtable(c) as select _wstart, c , count(*) c1, last_row(b) c2 from st partition by c interval(1s) ; +run tsim/stream/checkTaskStatus.sim + sql insert into aaa values(1648791221001,2,2,"/a1/aa/aa"); sql insert into bbb values(1648791221001,2,2,"/a1/aa/aa"); sql insert into ccc values(1648791221001,2,2,"/a1/aa/aa"); diff --git a/tests/script/tsim/stream/distributeIntervalRetrive0.sim b/tests/script/tsim/stream/distributeIntervalRetrive0.sim index 39c3353429..5569f4267b 100644 --- a/tests/script/tsim/stream/distributeIntervalRetrive0.sim +++ b/tests/script/tsim/stream/distributeIntervalRetrive0.sim @@ -45,7 +45,7 @@ sql create table ts3 using st tags(3,2,2); sql create table ts4 using st tags(4,2,2); sql create stream stream_t1 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 delete_mark 10s into streamtST1 as select _wstart, count(*) c1, sum(a) c3 , max(b) c4, min(c) c5 from st interval(10s); -sleep 1000 +run tsim/stream/checkTaskStatus.sim sql insert into ts1 values(1648791213001,1,12,3,1.0); sql insert into ts2 values(1648791213001,1,12,3,1.0); @@ -267,7 +267,8 @@ sql create table t1 using st tags(1,1,1); sql create table t2 using st tags(2,2,2); sql create stream streams1 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 delete_mark 20s into streamt1 as select _wstart as c0, count(*) c1, count(a) c2 from st interval(10s) ; -sleep 1000 +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791211000,1,2,3); sql insert into t1 values(1262275200000,2,2,3); diff --git a/tests/script/tsim/stream/distributeMultiLevelInterval0.sim b/tests/script/tsim/stream/distributeMultiLevelInterval0.sim index 3ac1fbdd2b..15cc0d2484 100644 --- a/tests/script/tsim/stream/distributeMultiLevelInterval0.sim +++ b/tests/script/tsim/stream/distributeMultiLevelInterval0.sim @@ -21,36 +21,7 @@ sql create table ts3 using st tags(3,2,2); sql create table ts4 using st tags(4,2,2); sql create stream streams1 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 watermark 1d into streamt1 as select _wstart, count(*) c1, sum(a) c3 , max(b) c4 from st interval(10s); -print ====check task status start - -$loop_count = 0 - -loopCheck: - -sleep 1000 - -$loop_count = $loop_count + 1 -if $loop_count == 30 then - return -1 -endi - -print 1 select * from information_schema.ins_stream_tasks; -sql select * from information_schema.ins_stream_tasks; - -if $rows == 0 then - print rows=$rows - goto loopCheck -endi - -print 1 select * from information_schema.ins_stream_tasks where status != "ready"; -sql select * from information_schema.ins_stream_tasks where status != "ready"; - -if $rows != 0 then - print rows=$rows - goto loopCheck -endi - -print ====check task status end +run tsim/stream/checkTaskStatus.sim sql insert into ts1 values(1648791213000,1,1,3,4.1); sql insert into ts1 values(1648791223000,2,2,3,1.1); diff --git a/tests/script/tsim/stream/distributeSession0.sim b/tests/script/tsim/stream/distributeSession0.sim index 9a112c2cdf..749b9bd273 100644 --- a/tests/script/tsim/stream/distributeSession0.sim +++ b/tests/script/tsim/stream/distributeSession0.sim @@ -41,36 +41,7 @@ sql create table ts1 using st tags(1,1,1); sql create table ts2 using st tags(2,2,2); sql create stream stream_t1 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamtST as select _wstart, count(*) c1, sum(a) c2 , max(b) c3 from st session(ts, 10s) ; -print ====check task status start - -$loop_count = 0 - -loopCheck: - -sleep 1000 - -$loop_count = $loop_count + 1 -if $loop_count == 30 then - return -1 -endi - -print 1 select * from information_schema.ins_stream_tasks; -sql select * from information_schema.ins_stream_tasks; - -if $rows == 0 then - print rows=$rows - goto loopCheck -endi - -print 1 select * from information_schema.ins_stream_tasks where status != "ready"; -sql select * from information_schema.ins_stream_tasks where status != "ready"; - -if $rows != 0 then - print rows=$rows - goto loopCheck -endi - -print ====check task status end +run tsim/stream/checkTaskStatus.sim sql insert into ts1 values(1648791211000,1,1,1) (1648791211005,1,1,1); sql insert into ts2 values(1648791221004,1,2,3) (1648791221008,2,2,3); @@ -117,36 +88,7 @@ sql create table ts1 using st tags(1,1,1); sql create table ts2 using st tags(2,2,2); sql create stream stream_t2 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamtST2 as select _wstart, count(*) c1, sum(a) c2 , max(b) c3 from st partition by a session(ts, 10s) ; -print ====check task status start - -$loop_count = 0 - -loopCheck1: - -sleep 1000 - -$loop_count = $loop_count + 1 -if $loop_count == 30 then - return -1 -endi - -print 1 select * from information_schema.ins_stream_tasks; -sql select * from information_schema.ins_stream_tasks; - -if $rows == 0 then - print rows=$rows - goto loopCheck1 -endi - -print 1 select * from information_schema.ins_stream_tasks where status != "ready"; -sql select * from information_schema.ins_stream_tasks where status != "ready"; - -if $rows != 0 then - print rows=$rows - goto loopCheck1 -endi - -print ====check task status end +run tsim/stream/checkTaskStatus.sim sql insert into ts1 values(1648791201000,1,1,1) (1648791210000,1,1,1); sql insert into ts1 values(1648791211000,2,1,1) (1648791212000,2,1,1); diff --git a/tests/script/tsim/stream/event0.sim b/tests/script/tsim/stream/event0.sim index 57116bbc79..bcb8fac27d 100644 --- a/tests/script/tsim/stream/event0.sim +++ b/tests/script/tsim/stream/event0.sim @@ -11,7 +11,9 @@ sql use test; sql create table t1(ts timestamp, a int, b int , c int, d double); sql create stream streams1 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt as select _wstart as s, count(*) c1, sum(b), max(c) from t1 event_window start with a = 0 end with a = 9; -sleep 1000 + +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791213000,0,1,1,1.0); sql insert into t1 values(1648791223001,9,2,2,1.1); sql insert into t1 values(1648791213009,0,3,3,1.0); @@ -157,7 +159,9 @@ sql use test2; sql create table t1(ts timestamp, a int, b int , c int, d double); sql create stream streams2 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt2 as select _wstart as s, count(*) c1, sum(b), max(c) from t1 event_window start with a = 0 end with b = 9; -sleep 1000 + +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791213000,0,1,1,1.0); sql insert into t1 values(1648791213009,1,2,2,2.1); sql insert into t1 values(1648791223000,0,9,9,9.0); @@ -205,7 +209,9 @@ sql use test3; sql create table t1(ts timestamp, a int, b int , c int, d double); sql create stream streams3 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt3 as select _wstart as s, count(*) c1, sum(b), max(c) from t1 event_window start with a = 0 end with b = 9; -sleep 1000 + +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791233009,1,2,2,2.1); diff --git a/tests/script/tsim/stream/event1.sim b/tests/script/tsim/stream/event1.sim index f3b0e4eb01..19d77abc82 100644 --- a/tests/script/tsim/stream/event1.sim +++ b/tests/script/tsim/stream/event1.sim @@ -11,7 +11,9 @@ sql use test1; sql create table t1(ts timestamp, a int, b int , c int, d double); sql create stream streams1 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt1 as select _wstart as s, count(*) c1, sum(b), max(c) from t1 event_window start with a = 0 end with b = 9; -sleep 1000 + +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791233000,0,1,1,1.0); sql insert into t1 values(1648791243000,1,9,9,9.0); @@ -54,7 +56,9 @@ sql use test2; sql create table t1(ts timestamp, a int, b int , c int, d double); sql create stream streams2 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt2 as select _wstart as s, count(*) c1, sum(b), max(c) from t1 event_window start with a = 0 end with b = 9; -sleep 1000 + +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791223000,0,3,3,3.0); @@ -240,7 +244,9 @@ sql create table t1 using st tags(1,1,1); sql create table t2 using st tags(2,2,2); sql create stream streams3 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt3 as select _wstart as s, count(*) c1, sum(b), max(c) from st partition by tbname event_window start with a = 0 end with b = 9; -sleep 1000 + +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791223000,0,3,3,3.0); diff --git a/tests/script/tsim/stream/event2.sim b/tests/script/tsim/stream/event2.sim index 9fc7615fb8..2b21ac84c5 100644 --- a/tests/script/tsim/stream/event2.sim +++ b/tests/script/tsim/stream/event2.sim @@ -35,7 +35,8 @@ sleep 1000 sql create stream streams0 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 fill_history 1 into streamt0 as select _wstart as s, count(*) c1, sum(b), max(c), _wend as e from st partition by tbname event_window start with a = 0 end with b = 9; -sleep 1000 +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791253000,1,9,13,2.0); sql insert into t2 values(1648791253000,1,9,14,2.0); diff --git a/tests/script/tsim/stream/eventtmp.sim b/tests/script/tsim/stream/eventtmp.sim index 52ca4fd9ef..392fb23615 100644 --- a/tests/script/tsim/stream/eventtmp.sim +++ b/tests/script/tsim/stream/eventtmp.sim @@ -22,7 +22,8 @@ sql insert into t4 values(1648791243000,1,9,12,2.0); sql create stream streams0 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 fill_history 1 into streamt0 as select _wstart as s, count(*) c1, sum(b), max(c), _wend as e from st partition by tbname event_window start with a = 0 end with b = 9; -sleep 1000 +run tsim/stream/checkTaskStatus.sim + sql insert into t4 values(1648791253000,1,9,16,2.0); diff --git a/tests/script/tsim/stream/fillHistoryBasic1.sim b/tests/script/tsim/stream/fillHistoryBasic1.sim index d2417a73ab..57193012b0 100644 --- a/tests/script/tsim/stream/fillHistoryBasic1.sim +++ b/tests/script/tsim/stream/fillHistoryBasic1.sim @@ -18,7 +18,9 @@ sql use test; sql create table t1(ts timestamp, a int, b int , c int, d double); sql create stream stream1 trigger at_once fill_history 1 IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt as select _wstart, count(*) c1, count(d) c2 , sum(a) c3 , max(b) c4, min(c) c5 from t1 interval(10s); -sleep 1000 + +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791213000,1,2,3,1.0); sql insert into t1 values(1648791223001,2,2,3,1.1); diff --git a/tests/script/tsim/stream/fillHistoryBasic2.sim b/tests/script/tsim/stream/fillHistoryBasic2.sim index b3dd947eb9..2fffa1e3e5 100644 --- a/tests/script/tsim/stream/fillHistoryBasic2.sim +++ b/tests/script/tsim/stream/fillHistoryBasic2.sim @@ -81,7 +81,8 @@ sql insert into ts3 values(1648791243006,4,2,3,3.1) (1648791213001,1,52,13,1.0) sql create stream stream_t1 trigger at_once fill_history 1 watermark 1d IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamtST1 as select _wstart, count(*) c1, count(d) c2 , sum(a) c3 , max(b) c4, min(c) c5 from st interval(10s); -sleep 1000 +run tsim/stream/checkTaskStatus.sim + $loop_count = 0 loop1: @@ -213,6 +214,8 @@ sql insert into ts2 values(1648791222001,2,2,3); sql create stream stream_t2 trigger at_once fill_history 1 watermark 20s IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamtST1 as select _wstart, count(*) c1, count(a) c2 , sum(a) c3 , max(b) c5, min(c) c6 from st interval(10s) ; +run tsim/stream/checkTaskStatus.sim + $loop_count = 0 loop2: sql select * from streamtST1; @@ -243,7 +246,8 @@ sql create table ts1 using st tags(1,1,1); sql create table ts2 using st tags(2,2,2); sql create stream stream_t3 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamtST3 as select ts, min(a) c6, a, b, c, ta, tb, tc from st interval(10s) ; -sleep 1000 +run tsim/stream/checkTaskStatus.sim + sql insert into ts1 values(1648791211000,1,2,3); sleep 50 diff --git a/tests/script/tsim/stream/fillHistoryBasic3.sim b/tests/script/tsim/stream/fillHistoryBasic3.sim index fb3776fbd3..ca109843c0 100644 --- a/tests/script/tsim/stream/fillHistoryBasic3.sim +++ b/tests/script/tsim/stream/fillHistoryBasic3.sim @@ -19,7 +19,8 @@ sql insert into t2 values(1648791213000,NULL,NULL,NULL,NULL); sql create stream streams2 trigger at_once fill_history 1 IGNORE EXPIRED 0 IGNORE UPDATE 0 into test.streamt2 as select _wstart c1, count(*) c2, max(a) c3 from st partition by a interval(10s); -sleep 3000 +run tsim/stream/checkTaskStatus.sim + $loop_count = 0 diff --git a/tests/script/tsim/stream/fillHistoryBasic4.sim b/tests/script/tsim/stream/fillHistoryBasic4.sim index 3e1ea68b4f..9fbf45bbeb 100644 --- a/tests/script/tsim/stream/fillHistoryBasic4.sim +++ b/tests/script/tsim/stream/fillHistoryBasic4.sim @@ -31,6 +31,8 @@ sql insert into t1 values(1648791213004,4,2,3,4.1); print create stream stream2 trigger at_once fill_history 1 IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt as select _wstart, count(*) c1, count(d) c2 , sum(a) c3 , max(b) c4, min(c) c5 from t1 interval(10s) sql create stream stream2 trigger at_once fill_history 1 IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt as select _wstart, count(*) c1, count(d) c2 , sum(a) c3 , max(b) c4, min(c) c5 from t1 interval(10s); +run tsim/stream/checkTaskStatus.sim + $loop_count = 0 loop0: diff --git a/tests/script/tsim/stream/fillHistoryTransform.sim b/tests/script/tsim/stream/fillHistoryTransform.sim index fe58b76b78..5933f7754e 100644 --- a/tests/script/tsim/stream/fillHistoryTransform.sim +++ b/tests/script/tsim/stream/fillHistoryTransform.sim @@ -23,6 +23,8 @@ sql insert into t1 values(1648791213000,10,2,3,1.0); sql create stream stream0 trigger at_once fill_history 1 IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt as select _wstart, sum(a) from t1 interval(10s); +run tsim/stream/checkTaskStatus.sim + $loop_count = 0 loop00: @@ -153,6 +155,8 @@ sql insert into t1 values(1648791213000,10,2,3,1.0); sql create stream stream1 trigger at_once fill_history 1 IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt1 as select _wstart, sum(a) from st interval(10s); +run tsim/stream/checkTaskStatus.sim + $loop_count = 0 loop00: @@ -283,6 +287,8 @@ sql insert into t1 values(1648791213000,10,2,3,1.0); sql create stream stream2 trigger at_once fill_history 1 IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt2 as select _wstart, sum(a) from st partition by ta interval(10s); +run tsim/stream/checkTaskStatus.sim + $loop_count = 0 loop00: diff --git a/tests/script/tsim/stream/fillIntervalDelete0.sim b/tests/script/tsim/stream/fillIntervalDelete0.sim index f63417411a..6ba3cc31e1 100644 --- a/tests/script/tsim/stream/fillIntervalDelete0.sim +++ b/tests/script/tsim/stream/fillIntervalDelete0.sim @@ -21,6 +21,9 @@ sql create stream streams2 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 in sql create stream streams3 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt3 as select _wstart as ts, max(a), sum(b), count(*) from t1 where ts >= 1648791210000 and ts < 1648791261000 interval(1s) fill(next); sql create stream streams4 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt4 as select _wstart as ts, max(a), sum(b), count(*) from t1 where ts >= 1648791210000 and ts < 1648791261000 interval(1s) fill(prev); sql create stream streams5 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt5 as select _wstart as ts, max(a), sum(b), count(*) from t1 where ts >= 1648791210000 and ts < 1648791261000 interval(1s) fill(linear); + +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791213000,1,1,1,1.0,'aaa'); sleep 1000 @@ -262,6 +265,8 @@ sql create stream streams8 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 in sql create stream streams9 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt9 as select _wstart as ts, max(a), sum(b), count(*) from st where ts >= 1648791210000 and ts < 1648791261000 interval(1s) fill(prev); sql create stream streams10 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt10 as select _wstart as ts, max(a), sum(b), count(*) from st where ts >= 1648791210000 and ts < 1648791261000 interval(1s) fill(linear); +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791210000,1,1,1,1.0,'aaa'); sql insert into t1 values(1648791217000,1,1,1,1.0,'aaa'); diff --git a/tests/script/tsim/stream/fillIntervalDelete1.sim b/tests/script/tsim/stream/fillIntervalDelete1.sim index 088dd9bdb7..11fe67bbe7 100644 --- a/tests/script/tsim/stream/fillIntervalDelete1.sim +++ b/tests/script/tsim/stream/fillIntervalDelete1.sim @@ -24,6 +24,8 @@ sql create stream streams3 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 in sql create stream streams4 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt4 as select _wstart as ts, max(a), sum(b), count(*) from t1 where ts >= 1648791210000 and ts < 1648791261000 interval(1s) fill(prev); sql create stream streams5 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt5 as select _wstart as ts, max(a), sum(b), count(*) from t1 where ts >= 1648791210000 and ts < 1648791261000 interval(1s) fill(linear); +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791210000,0,0,0,0.0,'aaa'); sql insert into t1 values(1648791213000,1,1,1,1.0,'bbb'); sql insert into t1 values(1648791215000,5,5,5,5.0,'ccc'); @@ -227,6 +229,8 @@ sql create stream streams8 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 in sql create stream streams9 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt9 as select _wstart as ts, max(a), sum(b), count(*) from st where ts >= 1648791210000 and ts < 1648791261000 interval(1s) fill(prev); sql create stream streams10 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt10 as select _wstart as ts, max(a), sum(b), count(*) from st where ts >= 1648791210000 and ts < 1648791261000 interval(1s) fill(linear); +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791210000,1,1,1,1.0,'aaa'); sql insert into t1 values(1648791215000,6,8,8,8.0,'bbb'); sql insert into t1 values(1648791220000,11,10,10,10.0,'ccc'); @@ -359,6 +363,7 @@ sql create stream streams13 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 i sql create stream streams14 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt14 as select _wstart as ts, avg(a), count(*), timezone(), to_iso8601(1) from t1 where ts >= 1648791210000 and ts < 1648791240000 interval(1s) fill(prev); sql create stream streams15 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt15 as select _wstart as ts, avg(a), count(*), timezone(), to_iso8601(1) from t1 where ts >= 1648791210000 and ts < 1648791240000 interval(1s) fill(linear); +run tsim/stream/checkTaskStatus.sim sql insert into t1 values(1648791210000,1,1,1,1.0,'aaa'); sql insert into t1 values(1648791210001,1,1,1,1.0,'aaa'); diff --git a/tests/script/tsim/stream/fillIntervalLinear.sim b/tests/script/tsim/stream/fillIntervalLinear.sim index 94a401ae8f..2d866b1e0a 100644 --- a/tests/script/tsim/stream/fillIntervalLinear.sim +++ b/tests/script/tsim/stream/fillIntervalLinear.sim @@ -17,6 +17,9 @@ sql create database test1 vgroups 1; sql use test1; sql create table t1(ts timestamp, a int, b int , c int, d double, s varchar(20)); sql create stream streams1 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt1 as select _wstart as ts, max(a)+sum(c), avg(b), first(s), count(*) from t1 where ts >= 1648791210000 and ts < 1648791261000 interval(1s) fill(linear); + +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791213000,4,4,4,4.0,'aaa') (1648791216000,5,5,5,5.0,'bbb'); sql insert into t1 values(1648791210000,1,1,1,1.0,'ccc') (1648791219000,2,2,2,2.0,'ddd') (1648791222000,3,3,3,3.0,'eee'); @@ -206,6 +209,9 @@ sql create database test2 vgroups 1; sql use test2; sql create table t1(ts timestamp, a int, b int , c int, d double, s varchar(20)); sql create stream streams2 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt2 as select _wstart as ts, max(a)+sum(c), avg(b), first(s), count(*) from t1 where ts >= 1648791210000 and ts < 1648791261000 interval(1s) fill(linear); + +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791210000,1,1,1,1.0,'ccc') (1648791219000,2,2,2,2.0,'ddd') (1648791222000,3,3,3,3.0,'eee'); sql insert into t1 values(1648791213000,4,4,4,4.0,'aaa') (1648791216000,5,5,5,5.0,'bbb'); @@ -394,6 +400,9 @@ sql create database test3 vgroups 1; sql use test3; sql create table t1(ts timestamp, a int, b int , c int, d double, s varchar(20)); sql create stream streams3 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt3 as select _wstart as ts, max(a), b+c, s, b+1, 1 from t1 where ts >= 1648791150000 and ts < 1648791261000 interval(1s) fill(linear); + +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791215000,1,1,1,1.0,'aaa'); sql insert into t1 values(1648791217000,2,2,2,2.0,'bbb'); sql insert into t1 values(1648791211000,3,3,3,3.0,'ccc'); diff --git a/tests/script/tsim/stream/fillIntervalPartitionBy.sim b/tests/script/tsim/stream/fillIntervalPartitionBy.sim index 193b34f743..4e19d79408 100644 --- a/tests/script/tsim/stream/fillIntervalPartitionBy.sim +++ b/tests/script/tsim/stream/fillIntervalPartitionBy.sim @@ -24,6 +24,8 @@ sql create stream streams3 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 in sql create stream streams4 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt4 as select _wstart as ts, max(a) c1, sum(b), count(*) from st where ts >= 1648791210000 and ts < 1648791261000 partition by ta interval(1s) fill(prev); sql create stream streams5 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt5 as select _wstart as ts, max(a) c1, sum(b), count(*) from st where ts >= 1648791210000 and ts < 1648791261000 partition by ta interval(1s) fill(linear); +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791210000,0,0,0,0.0,'aaa'); sql insert into t1 values(1648791213000,1,1,1,1.0,'bbb'); sql insert into t1 values(1648791215000,5,5,5,5.0,'ccc'); diff --git a/tests/script/tsim/stream/fillIntervalPrevNext.sim b/tests/script/tsim/stream/fillIntervalPrevNext.sim index 0bbdd78f3c..4e752c6a5c 100644 --- a/tests/script/tsim/stream/fillIntervalPrevNext.sim +++ b/tests/script/tsim/stream/fillIntervalPrevNext.sim @@ -17,6 +17,9 @@ sql use test1; sql create table t1(ts timestamp, a int, b int , c int, d double, s varchar(20)); sql create stream streams1 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt1 as select _wstart as ts, count(*) c1, max(b)+sum(a) from t1 where ts >= 1648791210000 and ts < 1648791261000 interval(1s) fill(prev); sql create stream streams2 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt2 as select _wstart as ts, count(*) c1, max(a)+min(c), avg(b) from t1 where ts >= 1648791210000 and ts < 1648791261000 interval(1s) fill(next); + +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791213000,4,4,4,4.0,'aaa') (1648791215000,5,5,5,5.0,'aaa'); sql insert into t1 values(1648791211000,1,1,1,1.0,'aaa') (1648791217000,2,2,2,2.0,'aaa') (1648791220000,3,3,3,3.0,'aaa'); @@ -265,6 +268,9 @@ sql use test5; sql create table t1(ts timestamp, a int, b int , c int, d double, s varchar(20)); sql create stream streams5 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt5 as select _wstart as ts, count(*) c1, max(b)+sum(a) from t1 where ts >= 1648791210000 and ts < 1648791261000 interval(1s) fill(prev); sql create stream streams6 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt6 as select _wstart as ts, count(*) c1, max(a)+min(c), avg(b) from t1 where ts >= 1648791210000 and ts < 1648791261000 interval(1s) fill(next); + +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791211000,1,1,1,1.0,'aaa') (1648791217000,2,2,2,2.0,'aaa') (1648791220000,3,3,3,3.0,'aaa'); sql insert into t1 values(1648791213000,4,4,4,4.0,'aaa') (1648791215000,5,5,5,5.0,'aaa'); diff --git a/tests/script/tsim/stream/fillIntervalPrevNext1.sim b/tests/script/tsim/stream/fillIntervalPrevNext1.sim index 91b2e64ad9..b6c24f7a0f 100644 --- a/tests/script/tsim/stream/fillIntervalPrevNext1.sim +++ b/tests/script/tsim/stream/fillIntervalPrevNext1.sim @@ -18,6 +18,9 @@ sql use test7; sql create table t1(ts timestamp, a int, b int , c int, d double, s varchar(20)); sql create stream streams7 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt7 as select _wstart as ts, max(a), b+c, s from t1 where ts >= 1648791150000 and ts < 1648791261000 interval(1s) fill(prev); sql create stream streams8 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt8 as select _wstart as ts, max(a), 1, b+1 from t1 where ts >= 1648791150000 and ts < 1648791261000 interval(1s) fill(next); + +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791215000,1,1,1,1.0,'aaa'); sql insert into t1 values(1648791217000,2,2,2,2.0,'bbb'); sql insert into t1 values(1648791211000,3,3,3,3.0,'ccc'); diff --git a/tests/script/tsim/stream/fillIntervalRange.sim b/tests/script/tsim/stream/fillIntervalRange.sim index e5316e6a1e..1b3a2d3e2a 100644 --- a/tests/script/tsim/stream/fillIntervalRange.sim +++ b/tests/script/tsim/stream/fillIntervalRange.sim @@ -14,6 +14,9 @@ sql use test; sql create table t1(ts timestamp, a int, b int , c int, d double, s varchar(20));; sql create stream streams1 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt as select _wstart ts, count(*) c1 from t1 interval(1s) fill(NULL); + +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791211000,1,2,3,1.0,'aaa'); sleep 100 sql insert into t1 values(1648795308000,1,2,3,1.0,'aaa'); @@ -131,6 +134,8 @@ sql create stream streams1 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 in print create stream streams2 trigger at_once into streamt2 as select _wstart ts, max(a) c1 from t1 interval(1s) fill(prev); sql create stream streams2 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt2 as select _wstart ts, max(a) c1 from t1 interval(1s) fill(prev); +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791211000,1,2,3,1.0,'aaa'); sleep 100 sql insert into t1 values(1648795308000,1,2,3,1.0,'aaa'); diff --git a/tests/script/tsim/stream/fillIntervalValue.sim b/tests/script/tsim/stream/fillIntervalValue.sim index dac73129e9..321e1bb708 100644 --- a/tests/script/tsim/stream/fillIntervalValue.sim +++ b/tests/script/tsim/stream/fillIntervalValue.sim @@ -15,6 +15,9 @@ sql use test; sql create table t1(ts timestamp, a int, b int , c int, d double, s varchar(20));; sql create stream streams1 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt as select _wstart ts, count(*) c1 from t1 where ts > 1648791210000 and ts < 1648791413000 interval(10s) fill(value, 100); sql create stream streams1a trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamta as select _wstart ts, count(*) c1 from t1 where ts > 1648791210000 and ts < 1648791413000 interval(10s) fill(value_f, 100); + +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791213000,1,2,3,1.0,'aaa'); sleep 100 sql insert into t1 values(1648791233000,1,2,3,1.0,'aaa'); @@ -147,6 +150,9 @@ sql create database test2 vgroups 1; sql use test2; sql create table t1(ts timestamp, a int, b int , c int, d double, s varchar(20)); sql create stream streams2 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt2 as select _wstart as ts, count(*) c1, max(b)+sum(a) from t1 where ts >= 1648791210000 and ts < 1648791261000 interval(1s) fill(value, 100,200); + +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791211000,1,1,1,1.0,'aaa') (1648791217000,2,2,2,2.0,'aaa') (1648791220000,3,3,3,3.0,'aaa'); sql insert into t1 values(1648791213000,4,4,4,4.0,'aaa') (1648791215000,5,5,5,5.0,'aaa'); @@ -282,6 +288,8 @@ sql use test3; sql create table t1(ts timestamp, a int, b int , c int, d double, s varchar(20)); sql create stream streams3 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt3 as select _wstart as ts, max(b), a+b, c from t1 where ts >= 1648791200000 and ts < 1648791261000 interval(10s) sliding(3s) fill(value, 100,200,300); +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791220000,1,1,1,1.0,'aaa'); sleep 100 sql insert into t1 values(1648791260000,1,1,1,1.0,'aaa'); @@ -473,6 +481,9 @@ sql create table t2 using st tags(2,2,2); sql create stream streams4 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt4 as select _wstart ts, count(*) c1, concat(tbname, 'aaa') as pname, timezone() from st where ts > 1648791000000 and ts < 1648793000000 partition by tbname interval(10s) fill(NULL); sql create stream streams4a trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt4a as select _wstart ts, count(*) c1, concat(tbname, 'aaa') as pname, timezone() from st where ts > 1648791000000 and ts < 1648793000000 partition by tbname interval(10s) fill(NULL_F); + +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791213000,1,2,3,1.0,'aaa'); sql insert into t1 values(1648791233000,1,2,3,1.0,'aaa'); sql insert into t1 values(1648791273000,1,2,3,1.0,'aaa'); diff --git a/tests/script/tsim/stream/ignoreCheckUpdate.sim b/tests/script/tsim/stream/ignoreCheckUpdate.sim index 108c845e4d..d73c42d3d7 100644 --- a/tests/script/tsim/stream/ignoreCheckUpdate.sim +++ b/tests/script/tsim/stream/ignoreCheckUpdate.sim @@ -16,6 +16,8 @@ print create stream streams0 trigger at_once IGNORE EXPIRED 0 ignore update 1 in sql create stream streams0 trigger at_once IGNORE EXPIRED 0 ignore update 1 into streamt as select _wstart c1, count(*) c2, max(b) c3 from t1 interval(10s); +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791213000,1,1,1); sql insert into t1 values(1648791213000,2,2,2); @@ -78,6 +80,8 @@ print create stream streams1 trigger at_once ignore update 1 into streamt1 as se sql create stream streams1 trigger at_once ignore update 1 into streamt1 as select _wstart c1, count(*) c2, max(b) c3 from t1 session(ts, 10s); +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791213000,1,1,1); sql insert into t1 values(1648791213000,2,2,2); @@ -141,6 +145,8 @@ print create stream streams2 trigger at_once ignore update 1 into streamt2 as se sql create stream streams2 trigger at_once ignore update 1 into streamt2 as select _wstart c1, count(*) c2, max(b) c3 from t1 state_window(c); +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791213000,1,1,1); sql insert into t1 values(1648791213000,2,2,1); @@ -206,7 +212,7 @@ print create stream streams3 trigger at_once ignore update 1 into streamt3 as se sql create stream streams3 trigger at_once ignore update 1 into streamt3 as select _wstart c1, count(*) c2, max(b) c3 from st interval(10s); -sleep 2000 +run tsim/stream/checkTaskStatus.sim sql insert into t1 values(1648791213000,1,1,1); sql insert into t1 values(1648791213000,2,2,2); diff --git a/tests/script/tsim/stream/ignoreExpiredData.sim b/tests/script/tsim/stream/ignoreExpiredData.sim index 864f8caea5..3624a8af32 100644 --- a/tests/script/tsim/stream/ignoreExpiredData.sim +++ b/tests/script/tsim/stream/ignoreExpiredData.sim @@ -48,6 +48,9 @@ sql create table t1(ts timestamp, a int, b int , c int, d double); sql create stream streams1 trigger at_once IGNORE EXPIRED 1 into streamt1 as select _wstart, count(*) c1, sum(a) c3 from t1 interval(10s); sql create stream streams2 trigger at_once IGNORE EXPIRED 1 into streamt2 as select _wstart, count(*) c1, sum(a) c3 from t1 session(ts,10s); sql create stream streams3 trigger at_once IGNORE EXPIRED 1 into streamt3 as select _wstart, count(*) c1, sum(a) c3 from t1 state_window(a); + +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791213000,1,2,3,1.0); sql insert into t1 values(1648791223001,1,2,3,1.1); sql insert into t1 values(1648791233002,2,2,3,2.1); @@ -114,6 +117,9 @@ sql create table ts1 using st tags(1,1,1); sql create table ts2 using st tags(2,2,2); sql create stream stream_t1 trigger at_once IGNORE EXPIRED 1 into streamtST1 as select _wstart, count(*) c1, count(a) c2 , sum(a) c3 , max(b) c5, min(c) c6 from st interval(10s) ; sql create stream stream_t2 trigger at_once IGNORE EXPIRED 1 into streamtST2 as select _wstart, count(*) c1, count(a) c2 , sum(a) c3 , max(b) c5, min(c) c6 from st session(ts, 10s) ; + +run tsim/stream/checkTaskStatus.sim + sql insert into ts1 values(1648791211000,1,2,3); sleep 1000 sql insert into ts1 values(1648791222001,2,2,3); @@ -197,7 +203,8 @@ sql create table ts2 using st tags(2,2,2); sql create table ts3 using st tags(3,3,3); sql create table ts4 using st tags(4,4,4); sql create stream streams_21 trigger at_once IGNORE EXPIRED 1 into streamt_21 as select _wstart, count(*) c1 from st interval(10s) ; -sleep 1000 + +run tsim/stream/checkTaskStatus.sim sql insert into ts1 values(1648791211000,1,2,3); sql insert into ts1 values(1648791211001,2,2,3); diff --git a/tests/script/tsim/stream/partitionby.sim b/tests/script/tsim/stream/partitionby.sim index 9a660741e7..6a4c7913a7 100644 --- a/tests/script/tsim/stream/partitionby.sim +++ b/tests/script/tsim/stream/partitionby.sim @@ -14,7 +14,8 @@ sql create table ts3 using st tags(3,2,2); sql create table ts4 using st tags(4,2,2); sql create stream stream_t1 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into test0.streamtST1 as select _wstart, count(*) c1, count(d) c2 , sum(a) c3 , max(b) c4, min(c) c5 from st partition by ta,tb,tc interval(10s); -sleep 500 +run tsim/stream/checkTaskStatus.sim + sql insert into ts1 values(1648791213001,1,12,3,1.0); sql insert into ts2 values(1648791213001,1,12,3,1.0); @@ -70,6 +71,7 @@ sql create table ts3 using st tags(1,4,5); sql create stream streams1 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt as select _wstart, count(*) c1, count(a) c2 from st partition by ta,tb,tc interval(10s); +run tsim/stream/checkTaskStatus.sim sql insert into ts1 values(1648791211000,1,2,3); @@ -100,6 +102,9 @@ sql create table ts1 using st tags(1,1,1); sql create table ts2 using st tags(2,2,2); sql create stream stream_t2 trigger at_once watermark 20s IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamtST as select _wstart, count(*) c1, count(a) c2 , sum(a) c3 , max(b) c5, min(c) c6, max(id) c7 from st partition by ta interval(10s) ; + +run tsim/stream/checkTaskStatus.sim + sql insert into ts1 values(1648791211000,1,2,3,1); sql insert into ts1 values(1648791222001,2,2,3,2); sql insert into ts2 values(1648791211000,1,2,3,3); diff --git a/tests/script/tsim/stream/partitionby1.sim b/tests/script/tsim/stream/partitionby1.sim index 24c588d410..306cb20e1f 100644 --- a/tests/script/tsim/stream/partitionby1.sim +++ b/tests/script/tsim/stream/partitionby1.sim @@ -13,7 +13,7 @@ sql create table ts3 using st tags(3,2,2); sql create table ts4 using st tags(4,2,2); sql create stream stream_t1 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamtST1 as select _wstart, count(*) c1, count(d) c2 , sum(a) c3 , max(b) c4, min(c) c5 from st partition by tbname interval(10s); -sleep 1000 +run tsim/stream/checkTaskStatus.sim sql insert into ts1 values(1648791213001,1,12,3,1.0); sql insert into ts2 values(1648791213001,1,12,3,1.0); @@ -47,6 +47,7 @@ sql create table ts3 using st tags(1,4,5); sql create stream streams1 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt as select _wstart, count(*) c1, count(a) c2 from st partition by tbname interval(10s); +run tsim/stream/checkTaskStatus.sim sql insert into ts1 values(1648791211000,1,2,3); @@ -77,6 +78,9 @@ sql create table ts1 using st tags(1,1,1); sql create table ts2 using st tags(2,2,2); sql create stream stream_t2 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamtST as select _wstart, count(*) c1, count(a) c2 , sum(a) c3 , max(b) c5, min(c) c6, max(id) c7 from st partition by tbname interval(10s) ; + +run tsim/stream/checkTaskStatus.sim + sql insert into ts1 values(1648791211000,1,2,3,1); sql insert into ts1 values(1648791222001,2,2,3,2); sql insert into ts2 values(1648791211000,1,2,3,3); diff --git a/tests/script/tsim/stream/partitionbyColumnOther.sim b/tests/script/tsim/stream/partitionbyColumnOther.sim index 8e6c0c1f23..fdb6be9fc2 100644 --- a/tests/script/tsim/stream/partitionbyColumnOther.sim +++ b/tests/script/tsim/stream/partitionbyColumnOther.sim @@ -14,7 +14,7 @@ sql use test0; sql create table t1(ts timestamp, a int, b int , c int, d double); sql create stream streams0 trigger at_once IGNORE EXPIRED 1 IGNORE UPDATE 0 watermark 100s into streamt0 subtable("aaa-a") as select _wstart, count(*) from t1 partition by a count_window(10); -sleep 1000 +run tsim/stream/checkTaskStatus.sim sql insert into t1 values(1648791213000,0,2,3,1.0); sql insert into t1 values(1648791213001,1,2,3,1.0); @@ -72,7 +72,7 @@ sql use test1; sql create table t1(ts timestamp, a int, b int , c int, d double); sql create stream streams1 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt1 subtable("aaa-a") as select _wstart, count(*) from t1 partition by a event_window start with b = 2 end with b = 2; -sleep 1000 +run tsim/stream/checkTaskStatus.sim sql insert into t1 values(1648791213000,0,2,3,1.0); sql insert into t1 values(1648791213001,1,2,3,1.0); diff --git a/tests/script/tsim/stream/partitionbyColumnSession.sim b/tests/script/tsim/stream/partitionbyColumnSession.sim index 1daa033399..0cf9013434 100644 --- a/tests/script/tsim/stream/partitionbyColumnSession.sim +++ b/tests/script/tsim/stream/partitionbyColumnSession.sim @@ -18,6 +18,8 @@ sql use test; sql create table t1(ts timestamp, a int, b int , c int, d double); sql create stream streams0 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt as select _wstart c1, count(*) c2, max(a) c3, _group_key(a) c4 from t1 partition by a session(ts, 5s); +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791213000,NULL,NULL,NULL,NULL); sql insert into t1 values(1648791213000,NULL,NULL,NULL,NULL); @@ -198,6 +200,8 @@ sql use test1; sql create table t1(ts timestamp, a int, b int , c int, d double); sql create stream streams1 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt1 as select _wstart c1, count(*) c2, max(c) c3, _group_key(a+b) c4 from t1 partition by a+b session(ts, 5s); +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791213000,NULL,NULL,NULL,NULL); sql insert into t1 values(1648791213000,NULL,NULL,NULL,NULL); sql insert into t1 values(1648791213000,1,2,1,1.0); @@ -284,7 +288,8 @@ sql create table t1 using st tags(1,1,1); sql create table t2 using st tags(2,2,2); sql create stream streams2 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into test.streamt2 as select _wstart c1, count(*) c2, max(a) c3 from st partition by a session(ts, 5s); -sleep 1000 +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791213000,NULL,NULL,NULL,NULL); sql insert into t1 values(1648791213000,NULL,NULL,NULL,NULL); sql insert into t2 values(1648791213000,NULL,NULL,NULL,NULL); @@ -481,7 +486,8 @@ sql create table t3 using st tags(2,2,2); sql create table t4 using st tags(2,2,2); sql create stream streams4 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into test.streamt4 as select _wstart c1, count(*) c2, max(a) c3 from st partition by a session(ts, 5s); -sleep 2000 +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791213000,2,2,3,1.0); sql insert into t2 values(1648791213000,2,2,3,1.0); sql insert into t3 values(1648791213000,2,2,3,1.0); @@ -568,7 +574,7 @@ sql use test5; sql create table t1(ts timestamp, a int, b int , c int, d double); sql create stream streams6 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt6 subtable("aaa-a") as select _wstart, count(*) from t1 partition by a session(ts, 10s); -sleep 1000 +run tsim/stream/checkTaskStatus.sim sql insert into t1 values(1648791213000,0,2,3,1.0); sql insert into t1 values(1648791213001,1,2,3,1.0); diff --git a/tests/script/tsim/stream/partitionbyColumnState.sim b/tests/script/tsim/stream/partitionbyColumnState.sim index d741426786..85fb8b2ff3 100644 --- a/tests/script/tsim/stream/partitionbyColumnState.sim +++ b/tests/script/tsim/stream/partitionbyColumnState.sim @@ -13,6 +13,8 @@ sql use test; sql create table t1(ts timestamp, a int, b int , c int, d double); sql create stream streams0 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt as select _wstart c1, count(*) c2, max(a) c3, _group_key(a) c4 from t1 partition by a state_window(b); +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791213000,NULL,NULL,NULL,NULL); sql insert into t1 values(1648791213000,NULL,NULL,NULL,NULL); @@ -188,6 +190,8 @@ sql use test1; sql create table t1(ts timestamp, a int, b int , c int, d int); sql create stream streams1 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt1 as select _wstart c1, count(*) c2, max(d) c3, _group_key(a+b) c4 from t1 partition by a+b state_window(c); +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791213000,NULL,NULL,NULL,NULL); sql insert into t1 values(1648791213000,NULL,NULL,NULL,NULL); sql insert into t1 values(1648791213000,1,2,1,1); @@ -273,7 +277,7 @@ sql use test2; sql create table t1(ts timestamp, a int, b int , c int, d double); sql create stream streams6 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into streamt6 subtable("aaa-a") as select _wstart, count(*) from t1 partition by a session(ts, 10s); -sleep 1000 +run tsim/stream/checkTaskStatus.sim sql insert into t1 values(1648791213000,0,2,3,1.0); sql insert into t1 values(1648791213001,1,2,3,1.0); diff --git a/tests/script/tsim/stream/pauseAndResume.sim b/tests/script/tsim/stream/pauseAndResume.sim index b9d6e141be..adb85fa8c4 100644 --- a/tests/script/tsim/stream/pauseAndResume.sim +++ b/tests/script/tsim/stream/pauseAndResume.sim @@ -17,7 +17,8 @@ sql create table ts3 using st tags(3,2,2); sql create table ts4 using st tags(4,2,2); sql create stream streams1 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 watermark 1d into streamt1 as select _wstart, count(*) c1, sum(a) c3 from st interval(10s); -sleep 2000 + +run tsim/stream/checkTaskStatus.sim sql_error create stream stream1_same_dst into streamt1 as select _wstart, count(*) c1, sum(a) c3 from st interval(10s); @@ -126,6 +127,7 @@ sql_error create stream streams2 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE sql create stream if not exists streams2 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 watermark 1d into streamt2 as select _wstart, count(*) c1, sum(a) c3 from t1 interval(10s); sleep 1000 +run tsim/stream/checkTaskStatus.sim sql pause stream streams2; @@ -264,6 +266,8 @@ sql create stream streams4 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 wate sql create stream streams5 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 watermark 1d into streamt5 as select _wstart, count(*) c1, sum(a) c3 from ts1 interval(10s); sleep 1000 +run tsim/stream/checkTaskStatus.sim + sql pause stream streams3; sql insert into ts1 values(1648791213001,1,12,3,1.0); @@ -337,6 +341,7 @@ sql create table ts4 using st tags(4,2,2); sql create stream streams6 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 watermark 1d into streamt6 as select _wstart, count(*) c1 from st interval(10s); sleep 1000 +run tsim/stream/checkTaskStatus.sim sql insert into ts1 values(1648791213001,1,12,3,1.0); sql insert into ts2 values(1648791213001,1,12,3,1.0); diff --git a/tests/script/tsim/stream/scalar.sim b/tests/script/tsim/stream/scalar.sim index ec55c3da66..45d734b76f 100644 --- a/tests/script/tsim/stream/scalar.sim +++ b/tests/script/tsim/stream/scalar.sim @@ -17,6 +17,8 @@ sql create stream streams0 into streamt0 as select ts c1, a, abs(b) c4 from t1 sql create stream streams1 into streamt1 as select ts c1, a, abs(b) c4 from t1; sql create stream streams2 into streamt2 as select ts c1, a, abs(b) c4 from st partition by tbname; +run tsim/stream/checkTaskStatus.sim + sql insert into t1 values(1648791213000,1,1,1,1); sql insert into t1 values(1648791213001,1,1,1,1); sql insert into t1 values(1648791213002,1,1,1,1); diff --git a/tests/script/tsim/stream/schedSnode.sim b/tests/script/tsim/stream/schedSnode.sim index e481fff83d..0fe53b0687 100644 --- a/tests/script/tsim/stream/schedSnode.sim +++ b/tests/script/tsim/stream/schedSnode.sim @@ -22,7 +22,7 @@ sql create table ts3 using st tags(3,2,2); sql create table ts4 using st tags(4,2,2); sql create stream stream_t1 trigger at_once IGNORE EXPIRED 0 IGNORE UPDATE 0 into target.streamtST1 as select _wstart, count(*) c1, count(d) c2 , sum(a) c3 , max(b) c4, min(c) c5 from st interval(10s); -sleep 1000 +run tsim/stream/checkTaskStatus.sim sql insert into ts1 values(1648791213001,1,12,3,1.0); sql insert into ts2 values(1648791213001,1,12,3,1.0); diff --git a/tests/script/tsim/stream/streamPrimaryKey0.sim b/tests/script/tsim/stream/streamPrimaryKey0.sim index 8905078a3e..94f62c4719 100644 --- a/tests/script/tsim/stream/streamPrimaryKey0.sim +++ b/tests/script/tsim/stream/streamPrimaryKey0.sim @@ -19,7 +19,7 @@ sql create table streamt2(ts timestamp, a int primary key, b bigint ) tags(ta va sql create stream streams0 trigger at_once ignore expired 0 ignore update 0 into streamt0 as select _wstart, count(*) c1, max(b) from t1 interval(1s); sql create stream streams2 trigger at_once ignore expired 0 ignore update 0 into streamt2 tags(ta) as select _wstart, count(*) c1, max(b) from st partition by tbname ta interval(1s); -sleep 1000 +run tsim/stream/checkTaskStatus.sim sql insert into t1 values(1648791210000,1,2,3,1.0); @@ -109,7 +109,7 @@ sql create table streamt5(ts timestamp, a int primary key, b bigint ) tags(ta va sql create stream streams3 trigger at_once ignore expired 0 ignore update 0 into streamt3 as select _wstart, count(*) c1, max(b) from t1 session(ts,1s); sql create stream streams5 trigger at_once ignore expired 0 ignore update 0 into streamt5 tags(ta) as select _wstart, count(*) c1, max(b) from st partition by tbname ta session(ts,1s); -sleep 1000 +run tsim/stream/checkTaskStatus.sim sql insert into t1 values(1648791210000,1,2,3,1.0); @@ -196,7 +196,7 @@ sql create table t1 using st tags("aa", 1, 2); sql create table streamt6(ts timestamp, a int primary key, b bigint ) tags(ta varchar(100),tb int,tc int); sql create stream streams6 trigger at_once ignore expired 0 ignore update 0 into streamt6 tags(ta) as select _wstart, count(*) c1, max(b) from st partition by tbname ta state_window(a); -sleep 1000 +run tsim/stream/checkTaskStatus.sim sql insert into t1 values(1648791210000,1,2,3,1.0); diff --git a/tests/script/tsim/stream/streamPrimaryKey1.sim b/tests/script/tsim/stream/streamPrimaryKey1.sim index 71971166d6..751a1ba7c7 100644 --- a/tests/script/tsim/stream/streamPrimaryKey1.sim +++ b/tests/script/tsim/stream/streamPrimaryKey1.sim @@ -18,7 +18,7 @@ sql create table streamt1(ts timestamp, a int primary key, b bigint ) tags(ta va sql create stream streams1 trigger at_once ignore expired 0 ignore update 0 into streamt1 as select _wstart, count(*) c1, max(b) from st interval(1s); -sleep 1000 +run tsim/stream/checkTaskStatus.sim sql insert into t1 values(1648791210000,1,2,3,1.0); @@ -74,7 +74,7 @@ sql create table t1 using st tags("aa", 1, 2); sql create table streamt3(ts timestamp, a int primary key, b bigint ) tags(ta varchar(100),tb int,tc int); sql create stream streams3 trigger at_once ignore expired 0 ignore update 0 into streamt3 as select _wstart, count(*) c1, max(b) from st session(ts,1s); -sleep 1000 +run tsim/stream/checkTaskStatus.sim sql insert into t1 values(1648791210000,1,2,3,1.0); diff --git a/tests/script/tsim/stream/streamPrimaryKey2.sim b/tests/script/tsim/stream/streamPrimaryKey2.sim index c47dc2bb4b..d6687c038d 100644 --- a/tests/script/tsim/stream/streamPrimaryKey2.sim +++ b/tests/script/tsim/stream/streamPrimaryKey2.sim @@ -18,7 +18,7 @@ sql create table streamt1(ts timestamp, a int primary key, b bigint ) tags(ta va sql create stream streams1 trigger at_once ignore expired 0 ignore update 0 into streamt1 tags(ta) as select _wstart, count(*) c1, max(b) from st partition by tbname ta EVENT_WINDOW start with a = 1 end with a = 3; -sleep 1000 +run tsim/stream/checkTaskStatus.sim sql insert into t1 values(1648791210000,1,2,3,1.0); sql insert into t1 values(1648791210010,3,2,3,1.0); @@ -83,7 +83,7 @@ sql create table t1 using st tags("aa", 1, 2); sql create table streamt3(ts timestamp, a int primary key, b bigint ) tags(ta varchar(100),tb int,tc int); sql create stream streams3 trigger at_once ignore expired 1 ignore update 0 WATERMARK 1000s into streamt3 tags(ta) as select _wstart, count(*) c1, max(b) from st partition by tbname ta COUNT_WINDOW(2); -sleep 1000 +run tsim/stream/checkTaskStatus.sim sql insert into t1 values(1648791210000,1,2,3,1.0); diff --git a/tests/script/tsim/stream/streamPrimaryKey3.sim b/tests/script/tsim/stream/streamPrimaryKey3.sim index 73038b6732..e6041b107b 100644 --- a/tests/script/tsim/stream/streamPrimaryKey3.sim +++ b/tests/script/tsim/stream/streamPrimaryKey3.sim @@ -17,7 +17,7 @@ sql create table t1 using st tags("aa", 1, 2); sql create stream streams1 trigger at_once ignore expired 0 ignore update 0 into streamt1(ts, a primary key, b) as select ts, a, b from t1 partition by b; -sleep 1000 +run tsim/stream/checkTaskStatus.sim sql insert into t1 values(1648791210000,1,2,3,1.0); sql insert into t1 values(1648791210000,2,4,3,1.0); @@ -79,7 +79,7 @@ sql create table t1 using st tags("aa", 1, 2); sql create stream streams2 trigger at_once ignore expired 0 ignore update 0 into streamt2(ts, a primary key, b) as select _wstart, max(b), count(*) from t1 partition by b interval(10s); -sleep 1000 +run tsim/stream/checkTaskStatus.sim sql insert into t1 values(1648791210000,1,2,1,1.0); sql insert into t1 values(1648791210000,2,4,2,1.0); @@ -226,7 +226,7 @@ sql create table t1 using st tags("aa", 1, 2); sql create stream streams3 trigger at_once ignore expired 0 ignore update 0 into streamt3(ts, a primary key, b) as select _wstart, max(b), count(*) from t1 partition by b session(ts, 10s); -sleep 1000 +run tsim/stream/checkTaskStatus.sim sql insert into t1 values(1648791210000,1,2,1,1.0); sql insert into t1 values(1648791210000,2,4,2,1.0);