提交 9d53b199 编写于 作者: 5 54liuyao

ci:modify stream test

上级 6483b92f
...@@ -163,7 +163,7 @@ endi ...@@ -163,7 +163,7 @@ endi
if $data01 != 4 then if $data01 != 4 then
print =====data01=$data01 print =====data01=$data01
return -1 goto loop3
endi endi
...@@ -239,7 +239,7 @@ endi ...@@ -239,7 +239,7 @@ endi
if $data01 != 6 then if $data01 != 6 then
print =====data01=$data01 print =====data01=$data01
return -1 goto loop5
endi endi
......
...@@ -325,19 +325,19 @@ if $rows != 12 then ...@@ -325,19 +325,19 @@ if $rows != 12 then
endi endi
if $data21 != 3 then if $data21 != 3 then
print ====streamt10=data21=$data21 print ====streamt10=data21=$data21
return -1 goto loop6
endi endi
if $data31 != 4 then if $data31 != 4 then
print ====streamt10=data31=$data31 print ====streamt10=data31=$data31
return -1 goto loop6
endi endi
if $data71 != 8 then if $data71 != 8 then
print ====streamt10=data71=$data71 print ====streamt10=data71=$data71
return -1 goto loop6
endi endi
if $data91 != 10 then if $data91 != 10 then
print ====streamt10=data91=$data91 print ====streamt10=data91=$data91
return -1 goto loop6
endi endi
......
...@@ -9,6 +9,8 @@ system sh/exec.sh -n dnode1 -s start ...@@ -9,6 +9,8 @@ system sh/exec.sh -n dnode1 -s start
sleep 200 sleep 200
sql connect sql connect
print step 1 start
sql drop stream if exists streams1; sql drop stream if exists streams1;
sql drop database if exists test1; sql drop database if exists test1;
sql create database test1 vgroups 1; sql create database test1 vgroups 1;
...@@ -38,161 +40,165 @@ endi ...@@ -38,161 +40,165 @@ endi
if $data01 != 2.000000000 then if $data01 != 2.000000000 then
print =====data01=$data01 print =====data01=$data01
return -1 goto loop1
endi endi
if $data02 != 1.000000000 then if $data02 != 1.000000000 then
print =====data02=$data02 print =====data02=$data02
return -1 goto loop1
endi endi
if $data03 != ccc then if $data03 != ccc then
print =====data03=$data03 print =====data03=$data03
return -1 goto loop1
endi endi
if $data04 != 1 then if $data04 != 1 then
print =====data04=$data04 print =====data04=$data04
return -1 goto loop1
endi endi
if $data11 != 4.000000000 then if $data11 != 4.000000000 then
print =====data11=$data11 print =====data11=$data11
return -1 goto loop1
endi endi
if $data12 != 2.000000000 then if $data12 != 2.000000000 then
print =====data12=$data12 print =====data12=$data12
return -1 goto loop1
endi endi
if $data13 != NULL then if $data13 != NULL then
print =====data13=$data13 print =====data13=$data13
return -1 goto loop1
endi endi
if $data21 != 6.000000000 then if $data21 != 6.000000000 then
print =====data21=$data21 print =====data21=$data21
return -1 goto loop1
endi endi
if $data22 != 3.000000000 then if $data22 != 3.000000000 then
print =====data22=$data22 print =====data22=$data22
return -1 goto loop1
endi endi
if $data23 != NULL then if $data23 != NULL then
print =====data23=$data23 print =====data23=$data23
return -1 goto loop1
endi endi
if $data31 != 8.000000000 then if $data31 != 8.000000000 then
print =====data31=$data31 print =====data31=$data31
return -1 goto loop1
endi endi
if $data32 != 4.000000000 then if $data32 != 4.000000000 then
print =====data32=$data32 print =====data32=$data32
return -1 goto loop1
endi endi
if $data33 != aaa then if $data33 != aaa then
print =====data33=$data33 print =====data33=$data33
return -1 goto loop1
endi endi
if $data41 != 8.666666667 then if $data41 != 8.666666667 then
print =====data41=$data41 print =====data41=$data41
return -1 goto loop1
endi endi
if $data42 != 4.333333333 then if $data42 != 4.333333333 then
print =====data42=$data42 print =====data42=$data42
return -1 goto loop1
endi endi
if $data43 != NULL then if $data43 != NULL then
print =====data43=$data43 print =====data43=$data43
return -1 goto loop1
endi endi
if $data51 != 9.333333333 then if $data51 != 9.333333333 then
print =====data01=$data01 print =====data01=$data01
return -1 goto loop1
endi endi
if $data52 != 4.666666667 then if $data52 != 4.666666667 then
print =====data52=$data52 print =====data52=$data52
return -1 goto loop1
endi endi
if $data53 != NULL then if $data53 != NULL then
print =====data53=$data53 print =====data53=$data53
return -1 goto loop1
endi endi
if $data61 != 10.000000000 then if $data61 != 10.000000000 then
print =====data61=$data61 print =====data61=$data61
return -1 goto loop1
endi endi
if $data62 != 5.000000000 then if $data62 != 5.000000000 then
print =====data62=$data62 print =====data62=$data62
return -1 goto loop1
endi endi
if $data71 != 8.000000000 then if $data71 != 8.000000000 then
print =====data71=$data71 print =====data71=$data71
return -1 goto loop1
endi endi
if $data72 != 4.000000000 then if $data72 != 4.000000000 then
print =====data72=$data72 print =====data72=$data72
return -1 goto loop1
endi endi
if $data81 != 6.000000000 then if $data81 != 6.000000000 then
print =====data81=$data81 print =====data81=$data81
return -1 goto loop1
endi endi
if $data82 != 3.000000000 then if $data82 != 3.000000000 then
print =====data82=$data82 print =====data82=$data82
return -1 goto loop1
endi endi
if $data91 != 4.000000000 then if $data91 != 4.000000000 then
print =====data91=$data91 print =====data91=$data91
return -1 goto loop1
endi endi
if $data92 != 2.000000000 then if $data92 != 2.000000000 then
print =====data92=$data92 print =====data92=$data92
return -1 goto loop1
endi endi
if $data[10][1] != 4.666666667 then if $data[10][1] != 4.666666667 then
print =====data[10][1]=$data[10][1] print =====data[10][1]=$data[10][1]
return -1 goto loop1
endi endi
if $data[10][2] != 2.333333333 then if $data[10][2] != 2.333333333 then
print =====data[10][2]=$data[10][2] print =====data[10][2]=$data[10][2]
return -1 goto loop1
endi endi
if $data[11][1] != 5.333333333 then if $data[11][1] != 5.333333333 then
print =====data[11][1]=$data[11][1] print =====data[11][1]=$data[11][1]
return -1 goto loop1
endi endi
if $data[11][2] != 2.666666667 then if $data[11][2] != 2.666666667 then
print =====data[11][2]=$data[11][2] print =====data[11][2]=$data[11][2]
return -1 goto loop1
endi endi
if $data[12][1] != 6.000000000 then if $data[12][1] != 6.000000000 then
print =====data[12][1]=$data[12][1] print =====data[12][1]=$data[12][1]
return -1 goto loop1
endi endi
if $data[12][2] != 3.000000000 then if $data[12][2] != 3.000000000 then
print =====data[12][2]=$data[12][2] print =====data[12][2]=$data[12][2]
return -1 goto loop1
endi endi
print step 1 end
print step 2 start
sql drop stream if exists streams2; sql drop stream if exists streams2;
sql drop database if exists test2; sql drop database if exists test2;
...@@ -224,161 +230,163 @@ endi ...@@ -224,161 +230,163 @@ endi
if $data01 != 2.000000000 then if $data01 != 2.000000000 then
print =====data01=$data01 print =====data01=$data01
return -1 goto loop2
endi endi
if $data02 != 1.000000000 then if $data02 != 1.000000000 then
print =====data02=$data02 print =====data02=$data02
return -1 goto loop2
endi endi
if $data03 != ccc then if $data03 != ccc then
print =====data03=$data03 print =====data03=$data03
return -1 goto loop2
endi endi
if $data04 != 1 then if $data04 != 1 then
print =====data04=$data04 print =====data04=$data04
return -1 goto loop2
endi endi
if $data11 != 4.000000000 then if $data11 != 4.000000000 then
print =====data11=$data11 print =====data11=$data11
return -1 goto loop2
endi endi
if $data12 != 2.000000000 then if $data12 != 2.000000000 then
print =====data12=$data12 print =====data12=$data12
return -1 goto loop2
endi endi
if $data13 != NULL then if $data13 != NULL then
print =====data13=$data13 print =====data13=$data13
return -1 goto loop2
endi endi
if $data21 != 6.000000000 then if $data21 != 6.000000000 then
print =====data21=$data21 print =====data21=$data21
return -1 goto loop2
endi endi
if $data22 != 3.000000000 then if $data22 != 3.000000000 then
print =====data22=$data22 print =====data22=$data22
return -1 goto loop2
endi endi
if $data23 != NULL then if $data23 != NULL then
print =====data23=$data23 print =====data23=$data23
return -1 goto loop2
endi endi
if $data31 != 8.000000000 then if $data31 != 8.000000000 then
print =====data31=$data31 print =====data31=$data31
return -1 goto loop2
endi endi
if $data32 != 4.000000000 then if $data32 != 4.000000000 then
print =====data32=$data32 print =====data32=$data32
return -1 goto loop2
endi endi
if $data33 != aaa then if $data33 != aaa then
print =====data33=$data33 print =====data33=$data33
return -1 goto loop2
endi endi
if $data41 != 8.666666667 then if $data41 != 8.666666667 then
print =====data41=$data41 print =====data41=$data41
return -1 goto loop2
endi endi
if $data42 != 4.333333333 then if $data42 != 4.333333333 then
print =====data42=$data42 print =====data42=$data42
return -1 goto loop2
endi endi
if $data43 != NULL then if $data43 != NULL then
print =====data43=$data43 print =====data43=$data43
return -1 goto loop2
endi endi
if $data51 != 9.333333333 then if $data51 != 9.333333333 then
print =====data01=$data01 print =====data01=$data01
return -1 goto loop2
endi endi
if $data52 != 4.666666667 then if $data52 != 4.666666667 then
print =====data52=$data52 print =====data52=$data52
return -1 goto loop2
endi endi
if $data53 != NULL then if $data53 != NULL then
print =====data53=$data53 print =====data53=$data53
return -1 goto loop2
endi endi
if $data61 != 10.000000000 then if $data61 != 10.000000000 then
print =====data61=$data61 print =====data61=$data61
return -1 goto loop2
endi endi
if $data62 != 5.000000000 then if $data62 != 5.000000000 then
print =====data62=$data62 print =====data62=$data62
return -1 goto loop2
endi endi
if $data71 != 8.000000000 then if $data71 != 8.000000000 then
print =====data71=$data71 print =====data71=$data71
return -1 goto loop2
endi endi
if $data72 != 4.000000000 then if $data72 != 4.000000000 then
print =====data72=$data72 print =====data72=$data72
return -1 goto loop2
endi endi
if $data81 != 6.000000000 then if $data81 != 6.000000000 then
print =====data81=$data81 print =====data81=$data81
return -1 goto loop2
endi endi
if $data82 != 3.000000000 then if $data82 != 3.000000000 then
print =====data82=$data82 print =====data82=$data82
return -1 goto loop2
endi endi
if $data91 != 4.000000000 then if $data91 != 4.000000000 then
print =====data91=$data91 print =====data91=$data91
return -1 goto loop2
endi endi
if $data92 != 2.000000000 then if $data92 != 2.000000000 then
print =====data92=$data92 print =====data92=$data92
return -1 goto loop2
endi endi
if $data[10][1] != 4.666666667 then if $data[10][1] != 4.666666667 then
print =====data[10][1]=$data[10][1] print =====data[10][1]=$data[10][1]
return -1 goto loop2
endi endi
if $data[10][2] != 2.333333333 then if $data[10][2] != 2.333333333 then
print =====data[10][2]=$data[10][2] print =====data[10][2]=$data[10][2]
return -1 goto loop2
endi endi
if $data[11][1] != 5.333333333 then if $data[11][1] != 5.333333333 then
print =====data[11][1]=$data[11][1] print =====data[11][1]=$data[11][1]
return -1 goto loop2
endi endi
if $data[11][2] != 2.666666667 then if $data[11][2] != 2.666666667 then
print =====data[11][2]=$data[11][2] print =====data[11][2]=$data[11][2]
return -1 goto loop2
endi endi
if $data[12][1] != 6.000000000 then if $data[12][1] != 6.000000000 then
print =====data[12][1]=$data[12][1] print =====data[12][1]=$data[12][1]
return -1 goto loop2
endi endi
if $data[12][2] != 3.000000000 then if $data[12][2] != 3.000000000 then
print =====data[12][2]=$data[12][2] print =====data[12][2]=$data[12][2]
return -1 goto loop2
endi endi
print step 2 end
print step 3 start
sql drop stream if exists streams3; sql drop stream if exists streams3;
sql drop database if exists test3; sql drop database if exists test3;
...@@ -412,98 +420,98 @@ endi ...@@ -412,98 +420,98 @@ endi
if $data01 != 3 then if $data01 != 3 then
print =====data01=$data01 print =====data01=$data01
return -1 goto loop3
endi endi
if $data02 != 6.000000000 then if $data02 != 6.000000000 then
print =====data02=$data02 print =====data02=$data02
return -1 goto loop3
endi endi
if $data03 != ccc then if $data03 != ccc then
print =====data03=$data03 print =====data03=$data03
return -1 goto loop3
endi endi
if $data11 != 3 then if $data11 != 3 then
print =====data11=$data11 print =====data11=$data11
return -1 goto loop3
endi endi
if $data12 != 7.000000000 then if $data12 != 7.000000000 then
print =====data12=$data12 print =====data12=$data12
return -1 goto loop3
endi endi
if $data13 != NULL then if $data13 != NULL then
print =====data13=$data13 print =====data13=$data13
return -1 goto loop3
endi endi
if $data21 != 4 then if $data21 != 4 then
print =====data21=$data21 print =====data21=$data21
return -1 goto loop3
endi endi
if $data22 != 8.000000000 then if $data22 != 8.000000000 then
print =====data22=$data22 print =====data22=$data22
return -1 goto loop3
endi endi
if $data23 != ddd then if $data23 != ddd then
print =====data23=$data23 print =====data23=$data23
return -1 goto loop3
endi endi
if $data31 != 2 then if $data31 != 2 then
print =====data31=$data31 print =====data31=$data31
return -1 goto loop3
endi endi
if $data32 != 5.000000000 then if $data32 != 5.000000000 then
print =====data32=$data32 print =====data32=$data32
return -1 goto loop3
endi endi
if $data33 != NULL then if $data33 != NULL then
print =====data33=$data33 print =====data33=$data33
return -1 goto loop3
endi endi
if $data41 != 1 then if $data41 != 1 then
print =====data41=$data41 print =====data41=$data41
return -1 goto loop3
endi endi
if $data42 != 2.000000000 then if $data42 != 2.000000000 then
print =====data42=$data42 print =====data42=$data42
return -1 goto loop3
endi endi
if $data43 != aaa then if $data43 != aaa then
print =====data43=$data43 print =====data43=$data43
return -1 goto loop3
endi endi
if $data51 != 1 then if $data51 != 1 then
print =====data51=$data51 print =====data51=$data51
return -1 goto loop3
endi endi
if $data52 != 3.000000000 then if $data52 != 3.000000000 then
print =====data52=$data52 print =====data52=$data52
return -1 goto loop3
endi endi
if $data53 != NULL then if $data53 != NULL then
print =====data53=$data53 print =====data53=$data53
return -1 goto loop3
endi endi
if $data61 != 2 then if $data61 != 2 then
print =====data61=$data61 print =====data61=$data61
return -1 goto loop3
endi endi
if $data62 != 4.000000000 then if $data62 != 4.000000000 then
print =====data62=$data62 print =====data62=$data62
return -1 goto loop3
endi endi
if $data63 != bbb then if $data63 != bbb then
print =====data63=$data63 print =====data63=$data63
return -1 goto loop3
endi endi
...@@ -534,42 +542,42 @@ endi ...@@ -534,42 +542,42 @@ endi
if $data01 != 6 then if $data01 != 6 then
print =====data01=$data01 print =====data01=$data01
return -1 goto loop4
endi endi
if $data02 != 12.000000000 then if $data02 != 12.000000000 then
print =====data02=$data02 print =====data02=$data02
return -1 goto loop4
endi endi
if $data03 != fff then if $data03 != fff then
print =====data03=$data03 print =====data03=$data03
return -1 goto loop4
endi endi
if $data11 != 6 then if $data11 != 6 then
print =====data11=$data11 print =====data11=$data11
return -1 goto loop4
endi endi
if $data12 != 13.000000000 then if $data12 != 13.000000000 then
print =====data12=$data12 print =====data12=$data12
return -1 goto loop4
endi endi
if $data13 != NULL then if $data13 != NULL then
print =====data13=$data13 print =====data13=$data13
return -1 goto loop4
endi endi
if $data21 != 7 then if $data21 != 7 then
print =====data21=$data21 print =====data21=$data21
return -1 goto loop4
endi endi
if $data22 != 14.000000000 then if $data22 != 14.000000000 then
print =====data22=$data22 print =====data22=$data22
return -1 goto loop4
endi endi
if $data23 != ggg then if $data23 != ggg then
print =====data23=$data23 print =====data23=$data23
return -1 goto loop4
endi endi
...@@ -626,33 +634,10 @@ if $data[12][3] != hhh then ...@@ -626,33 +634,10 @@ if $data[12][3] != hhh then
return -1 return -1
endi endi
if $data[13][1] != 8 then
print =====data[13][1]=$data[13][1]
return -1
endi
if $data[13][2] != 17.000000000 then
print =====data[13][2]=$data[13][2]
return -1
endi
if $data[13][3] != NULL then
print =====data[13][3]=$data[13][3]
return -1
endi
if $data[14][1] != 9 then
print =====data[14][1]=$data[14][1]
return -1
endi
if $data[14][2] != 18.000000000 then
print =====data[14][2]=$data[14][2]
return -1
endi
if $data[14][3] != iii then
print =====data[14][3]=$data[14][3]
return -1
endi
print step 3 end
......
...@@ -149,7 +149,7 @@ endi ...@@ -149,7 +149,7 @@ endi
if $data04 == 0 then if $data04 == 0 then
print ====streamt1=data04=$data04 print ====streamt1=data04=$data04
return -1 goto loop4
endi endi
sql select group_id,count(*) from streamt1 group by group_id; sql select group_id,count(*) from streamt1 group by group_id;
...@@ -168,7 +168,7 @@ endi ...@@ -168,7 +168,7 @@ endi
if $data04 == 0 then if $data04 == 0 then
print ====streamt2=data04=$data04 print ====streamt2=data04=$data04
return -1 goto loop4
endi endi
sql select group_id,count(*) from streamt2 group by group_id; sql select group_id,count(*) from streamt2 group by group_id;
...@@ -187,7 +187,7 @@ endi ...@@ -187,7 +187,7 @@ endi
if $data04 == 0 then if $data04 == 0 then
print ====streamt3=data04=$data04 print ====streamt3=data04=$data04
return -1 goto loop4
endi endi
sql select group_id,count(*) from streamt3 group by group_id; sql select group_id,count(*) from streamt3 group by group_id;
...@@ -207,7 +207,7 @@ endi ...@@ -207,7 +207,7 @@ endi
if $data04 == 0 then if $data04 == 0 then
print ====streamt4=data04=$data04 print ====streamt4=data04=$data04
return -1 goto loop4
endi endi
sql select group_id,count(*) from streamt4 group by group_id; sql select group_id,count(*) from streamt4 group by group_id;
...@@ -226,7 +226,7 @@ endi ...@@ -226,7 +226,7 @@ endi
if $data04 == 0 then if $data04 == 0 then
print ====streamt5=data04=$data04 print ====streamt5=data04=$data04
return -1 goto loop4
endi endi
sql select group_id,count(*) from streamt5 group by group_id; sql select group_id,count(*) from streamt5 group by group_id;
......
...@@ -228,31 +228,31 @@ endi ...@@ -228,31 +228,31 @@ endi
if $data72 != 6.000000000 then if $data72 != 6.000000000 then
print =====data72=$data72 print =====data72=$data72
return -1 goto loop1
endi endi
if $data73 != 3.000000000 then if $data73 != 3.000000000 then
print =====data73=$data73 print =====data73=$data73
return -1 goto loop1
endi endi
if $data82 != 6.000000000 then if $data82 != 6.000000000 then
print =====data82=$data82 print =====data82=$data82
return -1 goto loop1
endi endi
if $data83 != 3.000000000 then if $data83 != 3.000000000 then
print =====data83=$data83 print =====data83=$data83
return -1 goto loop1
endi endi
if $data92 != 6.000000000 then if $data92 != 6.000000000 then
print =====data92=$data92 print =====data92=$data92
return -1 goto loop1
endi endi
if $data93 != 3.000000000 then if $data93 != 3.000000000 then
print =====data93=$data93 print =====data93=$data93
return -1 goto loop1
endi endi
...@@ -483,535 +483,33 @@ endi ...@@ -483,535 +483,33 @@ endi
if $data72 != 6.000000000 then if $data72 != 6.000000000 then
print =====data72=$data72 print =====data72=$data72
return -1 goto loop6
endi endi
if $data73 != 3.000000000 then if $data73 != 3.000000000 then
print =====data73=$data73 print =====data73=$data73
return -1 goto loop6
endi endi
if $data82 != 6.000000000 then if $data82 != 6.000000000 then
print =====data82=$data82 print =====data82=$data82
return -1 goto loop6
endi endi
if $data83 != 3.000000000 then if $data83 != 3.000000000 then
print =====data83=$data83 print =====data83=$data83
return -1 goto loop6
endi endi
if $data92 != 6.000000000 then if $data92 != 6.000000000 then
print =====data92=$data92 print =====data92=$data92
return -1 goto loop6
endi endi
if $data93 != 3.000000000 then if $data93 != 3.000000000 then
print =====data93=$data93 print =====data93=$data93
return -1 goto loop6
endi
sql drop stream if exists streams7;
sql drop stream if exists streams8;
sql drop database if exists test7;
sql create database test7 vgroups 1;
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 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 into streamt8 as select _wstart as ts, max(a), 1, b+1 from t1 where ts >= 1648791150000 and ts < 1648791261000 interval(1s) fill(next);
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');
sql insert into t1 values(1648791213000,4,4,4,4.0,'ddd');
$loop_count = 0
loop7:
sleep 300
sql select * from streamt7 order by ts;
$loop_count = $loop_count + 1
if $loop_count == 10 then
return -1
endi
if $rows != 7 then
print =====rows=$rows
goto loop7
endi
if $data01 != 3 then
print =====data01=$data01
return -1
endi
if $data02 != 6.000000000 then
print =====data02=$data02
return -1
endi
if $data03 != ccc then
print =====data03=$data03
return -1
endi
if $data11 != 3 then
print =====data11=$data11
return -1
endi
if $data12 != 6.000000000 then
print =====data12=$data12
return -1
endi
if $data13 != ccc then
print =====data13=$data13
return -1
endi
if $data21 != 4 then
print =====data21=$data21
return -1
endi
if $data22 != 8.000000000 then
print =====data22=$data22
return -1
endi
if $data23 != ddd then
print =====data23=$data23
return -1
endi
if $data31 != 4 then
print =====data31=$data31
return -1
endi
if $data32 != 8.000000000 then
print =====data32=$data32
return -1
endi
if $data33 != ddd then
print =====data33=$data33
return -1
endi
if $data41 != 1 then
print =====data41=$data41
return -1
endi
if $data42 != 2.000000000 then
print =====data42=$data42
return -1
endi
if $data43 != aaa then
print =====data43=$data43
return -1
endi
if $data51 != 1 then
print =====data51=$data51
return -1
endi
if $data52 != 2.000000000 then
print =====data52=$data52
return -1
endi
if $data53 != aaa then
print =====data53=$data53
return -1
endi
if $data61 != 2 then
print =====data61=$data61
return -1
endi
if $data62 != 4.000000000 then
print =====data62=$data62
return -1
endi
if $data63 != bbb then
print =====data63=$data63
return -1
endi
#--------------
sleep 200
sql select * from streamt8 order by ts;
if $rows != 7 then
print =====rows=$rows
return -1
endi
if $data01 != 3 then
print =====data01=$data01
return -1
endi
if $data02 != 1 then
print =====data02=$data02
return -1
endi
if $data03 != 4.000000000 then
print =====data03=$data03
return -1
endi
if $data11 != 4 then
print =====data11=$data11
return -1
endi
if $data12 != 1 then
print =====data12=$data12
return -1
endi
if $data13 != 5.000000000 then
print =====data13=$data13
return -1
endi
if $data21 != 4 then
print =====data21=$data21
return -1
endi
if $data22 != 1 then
print =====data22=$data22
return -1
endi
if $data23 != 5.000000000 then
print =====data23=$data23
return -1
endi
if $data31 != 1 then
print =====data31=$data31
return -1
endi
if $data32 != 1 then
print =====data32=$data32
return -1
endi
if $data33 != 2.000000000 then
print =====data33=$data33
return -1
endi
if $data41 != 1 then
print =====data41=$data41
return -1
endi
if $data42 != 1 then
print =====data42=$data42
return -1
endi
if $data43 != 2.000000000 then
print =====data43=$data43
return -1
endi
if $data51 != 2 then
print =====data51=$data51
return -1
endi
if $data52 != 1 then
print =====data52=$data52
return -1
endi
if $data53 != 3.000000000 then
print =====data53=$data53
return -1
endi
if $data61 != 2 then
print =====data61=$data61
return -1
endi
if $data62 != 1 then
print =====data62=$data62
return -1
endi
if $data63 != 3.000000000 then
print =====data63=$data63
return -1
endi
sql insert into t1 values(1648791212000,5,5,5,5.0,'eee');
sql insert into t1 values(1648791207000,6,6,6,6.0,'fff') (1648791209000,7,7,7,7.0,'ggg') (1648791219000,8,8,8,8.0,'hhh') (1648791221000,9,9,9,9.0,'iii');
$loop_count = 0
loop8:
sleep 200
sql select * from streamt7 order by ts;
$loop_count = $loop_count + 1
if $loop_count == 10 then
return -1
endi
if $rows != 15 then
print =====rows=$rows
goto loop8
endi
if $data01 != 6 then
print =====data01=$data01
return -1
endi
if $data02 != 12.000000000 then
print =====data02=$data02
return -1
endi
if $data03 != fff then
print =====data03=$data03
return -1
endi
if $data11 != 6 then
print =====data11=$data11
return -1
endi
if $data12 != 12.000000000 then
print =====data12=$data12
return -1
endi
if $data13 != fff then
print =====data13=$data13
return -1
endi
if $data21 != 7 then
print =====data21=$data21
return -1
endi
if $data22 != 14.000000000 then
print =====data22=$data22
return -1
endi
if $data23 != ggg then
print =====data23=$data23
return -1
endi
if $data31 != 7 then
print =====data31=$data31
return -1
endi
if $data32 != 14.000000000 then
print =====data32=$data32
return -1
endi
if $data33 != ggg then
print =====data33=$data33
return -1
endi
if $data51 != 5 then
print =====data51=$data51
return -1
endi
if $data52 != 10.000000000 then
print =====data52=$data52
return -1
endi
if $data53 != eee then
print =====data53=$data53
return -1
endi
if $data[11][1] != 2 then
print =====data[11][1]=$data[11][1]
return -1
endi
if $data[11][2] != 4.000000000 then
print =====data[11][2]=$data[11][2]
return -1
endi
if $data[11][3] != bbb then
print =====data[11][3]=$data[11][3]
return -1
endi
if $data[12][1] != 8 then
print =====data[12][1]=$data[12][1]
return -1
endi
if $data[12][2] != 16.000000000 then
print =====data[12][2]=$data[12][2]
return -1
endi
if $data[12][3] != hhh then
print =====data[12][3]=$data[12][3]
return -1
endi
if $data[13][1] != 8 then
print =====data[13][1]=$data[13][1]
return -1
endi
if $data[13][2] != 16.000000000 then
print =====data[13][2]=$data[13][2]
return -1
endi
if $data[13][3] != hhh then
print =====data[13][3]=$data[13][3]
return -1
endi
if $data[14][1] != 9 then
print =====data[14][1]=$data[14][1]
return -1
endi
if $data[14][2] != 18.000000000 then
print =====data[14][2]=$data[14][2]
return -1
endi
if $data[14][3] != iii then
print =====data[14][3]=$data[14][3]
return -1
endi
print fill next-----------------890
sql use test7;
sql select * from streamt8 order by ts;
if $rows != 15 then
print =====rows=$rows
goto loop8
endi
if $data01 != 6 then
print =====data01=$data01
return -1
endi
if $data02 != 1 then
print =====data02=$data02
return -1
endi
if $data03 != 7.000000000 then
print =====data03=$data03
return -1
endi
if $data11 != 7 then
print =====data11=$data11
return -1
endi
if $data13 != 8.000000000 then
print =====data13=$data13
return -1
endi
if $data21 != 7 then
print =====data21=$data21
return -1
endi
if $data23 != 8.000000000 then
print =====data23=$data23
return -1
endi
if $data31 != 3 then
print =====data31=$data31
return -1
endi
if $data33 != 4.000000000 then
print =====data33=$data33
return -1
endi
if $data51 != 5 then
print =====data51=$data51
return -1
endi
if $data53 != 6.000000000 then
print =====data53=$data53
return -1
endi
if $data[11][1] != 8 then
print =====data[11][1]=$data[11][1]
return -1
endi
if $data[11][2] != 1 then
print =====data[11][2]=$data[11][2]
return -1
endi
if $data[11][3] != 9.000000000 then
print =====data[11][3]=$data[11][3]
return -1
endi
if $data[12][1] != 8 then
print =====data[12][1]=$data[12][1]
return -1
endi
if $data[12][3] != 9.000000000 then
print =====data[12][3]=$data[12][3]
return -1
endi
if $data[13][1] != 9 then
print =====data[13][1]=$data[13][1]
return -1
endi
if $data[13][3] != 10.000000000 then
print =====data[13][3]=$data[13][3]
return -1
endi
if $data[14][1] != 9 then
print =====data[14][1]=$data[14][1]
return -1
endi
if $data[14][3] != 10.000000000 then
print =====data[14][3]=$data[14][3]
return -1
endi endi
#==system sh/exec.sh -n dnode1 -s stop -x SIGINT #==system sh/exec.sh -n dnode1 -s stop -x SIGINT
......
$loop_all = 0
looptest:
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start
#==system sh/exec.sh -n dnode1 -s start -v
sleep 200
sql connect
sql drop stream if exists streams7;
sql drop stream if exists streams8;
sql drop database if exists test7;
sql create database test7 vgroups 1;
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 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 into streamt8 as select _wstart as ts, max(a), 1, b+1 from t1 where ts >= 1648791150000 and ts < 1648791261000 interval(1s) fill(next);
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');
sql insert into t1 values(1648791213000,4,4,4,4.0,'ddd');
$loop_count = 0
loop7:
sleep 300
sql select * from streamt7 order by ts;
$loop_count = $loop_count + 1
if $loop_count == 10 then
return -1
endi
if $rows != 7 then
print =====rows=$rows
goto loop7
endi
if $data01 != 3 then
print =====data01=$data01
goto loop7
endi
if $data02 != 6.000000000 then
print =====data02=$data02
goto loop7
endi
if $data03 != ccc then
print =====data03=$data03
goto loop7
endi
if $data11 != 3 then
print =====data11=$data11
goto loop7
endi
if $data12 != 6.000000000 then
print =====data12=$data12
goto loop7
endi
if $data13 != ccc then
print =====data13=$data13
goto loop7
endi
if $data21 != 4 then
print =====data21=$data21
goto loop7
endi
if $data22 != 8.000000000 then
print =====data22=$data22
goto loop7
endi
if $data23 != ddd then
print =====data23=$data23
goto loop7
endi
if $data31 != 4 then
print =====data31=$data31
goto loop7
endi
if $data32 != 8.000000000 then
print =====data32=$data32
goto loop7
endi
if $data33 != ddd then
print =====data33=$data33
goto loop7
endi
if $data41 != 1 then
print =====data41=$data41
goto loop7
endi
if $data42 != 2.000000000 then
print =====data42=$data42
goto loop7
endi
if $data43 != aaa then
print =====data43=$data43
goto loop7
endi
if $data51 != 1 then
print =====data51=$data51
goto loop7
endi
if $data52 != 2.000000000 then
print =====data52=$data52
goto loop7
endi
if $data53 != aaa then
print =====data53=$data53
goto loop7
endi
if $data61 != 2 then
print =====data61=$data61
goto loop7
endi
if $data62 != 4.000000000 then
print =====data62=$data62
goto loop7
endi
if $data63 != bbb then
print =====data63=$data63
goto loop7
endi
#--------------
loop71:
$loop_count = 0
sleep 300
sql select * from streamt8 order by ts;
$loop_count = $loop_count + 1
if $loop_count == 10 then
return -1
endi
if $rows != 7 then
print =====rows=$rows
goto loop71
endi
if $data01 != 3 then
print =====data01=$data01
goto loop71
endi
if $data02 != 1 then
print =====data02=$data02
goto loop71
endi
if $data03 != 4.000000000 then
print =====data03=$data03
goto loop71
endi
if $data11 != 4 then
print =====data11=$data11
goto loop71
endi
if $data12 != 1 then
print =====data12=$data12
goto loop71
endi
if $data13 != 5.000000000 then
print =====data13=$data13
goto loop71
endi
if $data21 != 4 then
print =====data21=$data21
goto loop71
endi
if $data22 != 1 then
print =====data22=$data22
goto loop71
endi
if $data23 != 5.000000000 then
print =====data23=$data23
goto loop71
endi
if $data31 != 1 then
print =====data31=$data31
goto loop71
endi
if $data32 != 1 then
print =====data32=$data32
goto loop71
endi
if $data33 != 2.000000000 then
print =====data33=$data33
goto loop71
endi
if $data41 != 1 then
print =====data41=$data41
goto loop71
endi
if $data42 != 1 then
print =====data42=$data42
goto loop71
endi
if $data43 != 2.000000000 then
print =====data43=$data43
goto loop71
endi
if $data51 != 2 then
print =====data51=$data51
goto loop71
endi
if $data52 != 1 then
print =====data52=$data52
goto loop71
endi
if $data53 != 3.000000000 then
print =====data53=$data53
goto loop71
endi
if $data61 != 2 then
print =====data61=$data61
goto loop71
endi
if $data62 != 1 then
print =====data62=$data62
goto loop71
endi
if $data63 != 3.000000000 then
print =====data63=$data63
goto loop71
endi
sql insert into t1 values(1648791212000,5,5,5,5.0,'eee');
sql insert into t1 values(1648791207000,6,6,6,6.0,'fff') (1648791209000,7,7,7,7.0,'ggg') (1648791219000,8,8,8,8.0,'hhh') (1648791221000,9,9,9,9.0,'iii');
$loop_count = 0
loop8:
sleep 200
sql select * from streamt7 order by ts;
$loop_count = $loop_count + 1
if $loop_count == 10 then
return -1
endi
if $rows != 15 then
print =====rows=$rows
goto loop8
endi
if $data01 != 6 then
print =====data01=$data01
goto loop8
endi
if $data02 != 12.000000000 then
print =====data02=$data02
goto loop8
endi
if $data03 != fff then
print =====data03=$data03
goto loop8
endi
if $data11 != 6 then
print =====data11=$data11
goto loop8
endi
if $data12 != 12.000000000 then
print =====data12=$data12
goto loop8
endi
if $data13 != fff then
print =====data13=$data13
goto loop8
endi
if $data21 != 7 then
print =====data21=$data21
goto loop8
endi
if $data22 != 14.000000000 then
print =====data22=$data22
goto loop8
endi
if $data23 != ggg then
print =====data23=$data23
goto loop8
endi
if $data31 != 7 then
print =====data31=$data31
goto loop8
endi
if $data32 != 14.000000000 then
print =====data32=$data32
goto loop8
endi
if $data33 != ggg then
print =====data33=$data33
goto loop8
endi
if $data51 != 5 then
print =====data51=$data51
goto loop8
endi
if $data52 != 10.000000000 then
print =====data52=$data52
goto loop8
endi
if $data53 != eee then
print =====data53=$data53
goto loop8
endi
if $data[11][1] != 2 then
print =====data[11][1]=$data[11][1]
goto loop8
endi
if $data[11][2] != 4.000000000 then
print =====data[11][2]=$data[11][2]
goto loop8
endi
if $data[11][3] != bbb then
print =====data[11][3]=$data[11][3]
goto loop8
endi
if $data[12][1] != 8 then
print =====data[12][1]=$data[12][1]
goto loop8
endi
if $data[12][2] != 16.000000000 then
print =====data[12][2]=$data[12][2]
goto loop8
endi
if $data[12][3] != hhh then
print =====data[12][3]=$data[12][3]
goto loop8
endi
if $data[13][1] != 8 then
print =====data[13][1]=$data[13][1]
goto loop8
endi
if $data[13][2] != 16.000000000 then
print =====data[13][2]=$data[13][2]
goto loop8
endi
if $data[13][3] != hhh then
print =====data[13][3]=$data[13][3]
goto loop8
endi
if $data[14][1] != 9 then
print =====data[14][1]=$data[14][1]
goto loop8
endi
if $data[14][2] != 18.000000000 then
print =====data[14][2]=$data[14][2]
goto loop8
endi
if $data[14][3] != iii then
print =====data[14][3]=$data[14][3]
goto loop8
endi
print fill next-----------------890
sql use test7;
sql select * from streamt8 order by ts;
if $rows != 15 then
print =====rows=$rows
goto loop8
endi
if $data01 != 6 then
print =====data01=$data01
goto loop8
endi
if $data02 != 1 then
print =====data02=$data02
goto loop8
endi
if $data03 != 7.000000000 then
print =====data03=$data03
goto loop8
endi
if $data11 != 7 then
print =====data11=$data11
goto loop8
endi
if $data13 != 8.000000000 then
print =====data13=$data13
goto loop8
endi
if $data21 != 7 then
print =====data21=$data21
goto loop8
endi
if $data23 != 8.000000000 then
print =====data23=$data23
goto loop8
endi
if $data31 != 3 then
print =====data31=$data31
goto loop8
endi
if $data33 != 4.000000000 then
print =====data33=$data33
goto loop8
endi
if $data51 != 5 then
print =====data51=$data51
goto loop8
endi
if $data53 != 6.000000000 then
print =====data53=$data53
goto loop8
endi
if $data[11][1] != 8 then
print =====data[11][1]=$data[11][1]
goto loop8
endi
if $data[11][2] != 1 then
print =====data[11][2]=$data[11][2]
goto loop8
endi
if $data[11][3] != 9.000000000 then
print =====data[11][3]=$data[11][3]
goto loop8
endi
if $data[12][1] != 8 then
print =====data[12][1]=$data[12][1]
goto loop8
endi
if $data[12][3] != 9.000000000 then
print =====data[12][3]=$data[12][3]
goto loop8
endi
if $data[13][1] != 9 then
print =====data[13][1]=$data[13][1]
goto loop8
endi
if $data[13][3] != 10.000000000 then
print =====data[13][3]=$data[13][3]
goto loop8
endi
if $data[14][1] != 9 then
print =====data[14][1]=$data[14][1]
goto loop8
endi
if $data[14][3] != 10.000000000 then
print =====data[14][3]=$data[14][3]
goto loop8
endi
#==system sh/exec.sh -n dnode1 -s stop -x SIGINT
#==print =============== check
#==$null=
#==system_content sh/checkValgrind.sh -n dnode1
#==print cmd return result ----> [ $system_content ]
#==if $system_content > 0 then
#== return -1
#==endi
#==if $system_content == $null then
#== return -1
#==endi
#==return 1
sql drop stream if exists streams0;
sql drop stream if exists streams1;
sql drop stream if exists streams2;
sql drop stream if exists streams3;
sql drop stream if exists streams4;
sql drop stream if exists streams5;
sql drop stream if exists streams6;
sql drop stream if exists streams7;
sql drop stream if exists streams8;
sql use test7;
sql select * from t1;
print $data00
$loop_all = $loop_all + 1
print ============loop_all=$loop_all
system sh/stop_dnodes.sh
#goto looptest
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册