提交 50729272 编写于 作者: S Shengliang Guan

test: case for stable

上级 ad51f506
...@@ -171,12 +171,12 @@ ...@@ -171,12 +171,12 @@
./test.sh -f tsim/vnode/replica3_vgroup.sim ./test.sh -f tsim/vnode/replica3_vgroup.sim
#./test.sh -f tsim/vnode/replica3_many.sim #./test.sh -f tsim/vnode/replica3_many.sim
#./test.sh -f tsim/vnode/replica3_import.sim #./test.sh -f tsim/vnode/replica3_import.sim
#./test.sh -f tsim/vnode/stable_balance_replica1.sim ./test.sh -f tsim/vnode/stable_balance_replica1.sim
./test.sh -f tsim/vnode/stable_dnode2_stop.sim ./test.sh -f tsim/vnode/stable_dnode2_stop.sim
./test.sh -f tsim/vnode/stable_dnode2.sim ./test.sh -f tsim/vnode/stable_dnode2.sim
#./test.sh -f tsim/vnode/stable_dnode3.sim ./test.sh -f tsim/vnode/stable_dnode3.sim
#./test.sh -f tsim/vnode/stable_replica3_dnode6.sim ./test.sh -f tsim/vnode/stable_replica3_dnode6.sim
#./test.sh -f tsim/vnode/stable_replica3_vnode3.sim ./test.sh -f tsim/vnode/stable_replica3_vnode3.sim
# --- sync # --- sync
./test.sh -f tsim/sync/3Replica1VgElect.sim ./test.sh -f tsim/sync/3Replica1VgElect.sim
......
...@@ -124,6 +124,8 @@ if $data(5)[3] != 3 then ...@@ -124,6 +124,8 @@ if $data(5)[3] != 3 then
return -1 return -1
endi endi
#sql reset query cache
print =============== step4: select data print =============== step4: select data
sql show d1.tables sql show d1.tables
if $rows != 1 then if $rows != 1 then
......
system sh/stop_dnodes.sh system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode2 -i 2
system sh/cfg.sh -n dnode1 -c statusInterval -v 1 system sh/deploy.sh -n dnode3 -i 3
system sh/cfg.sh -n dnode2 -c statusInterval -v 1 system sh/deploy.sh -n dnode4 -i 4
system sh/cfg.sh -n dnode1 -c balanceInterval -v 10 system sh/cfg.sh -n dnode1 -c supportVnodes -v 4
system sh/cfg.sh -n dnode2 -c balanceInterval -v 10 system sh/cfg.sh -n dnode2 -c supportVnodes -v 4
system sh/cfg.sh -n dnode1 -c walLevel -v 2 system sh/cfg.sh -n dnode3 -c supportVnodes -v 4
system sh/cfg.sh -n dnode2 -c walLevel -v 2 system sh/cfg.sh -n dnode4 -c supportVnodes -v 4
system sh/cfg.sh -n dnode1 -c mnodeEqualVnodeNum -v 0
system sh/cfg.sh -n dnode2 -c mnodeEqualVnodeNum -v 0
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode2 -c maxtablesPerVnode -v 4
$dbPrefix = br1_db $dbPrefix = br1_db
$tbPrefix = br1_tb $tbPrefix = br1_tb
...@@ -29,7 +25,7 @@ $db = $dbPrefix ...@@ -29,7 +25,7 @@ $db = $dbPrefix
$mt = $mtPrefix $mt = $mtPrefix
$st = $stPrefix . $i $st = $stPrefix . $i
sql create database $db sql create database $db vgroups 4
sql use $db sql use $db
sql create table $mt (ts timestamp, tbcol int, tbcol2 float) TAGS(tgcol int) sql create table $mt (ts timestamp, tbcol int, tbcol2 float) TAGS(tgcol int)
...@@ -54,51 +50,47 @@ endw ...@@ -54,51 +50,47 @@ endw
sleep 100 sleep 100
print =============== step2 print =============== step2
sql show dnodes
$x = 0 print dnode1 openVnodes $data(1)[2]
show1: if $data(1)[2] != 4 then
$x = $x + 1 return -1
sleep 2000
if $x == 10 then
return -1
endi
sql show dnodes -x show1
$dnode1Vnodes = $data2_1
print dnode1 $dnode1Vnodes
$dnode2Vnodes = $data2_2
print dnode2 $dnode2Vnodes
if $dnode1Vnodes != 4 then
goto show1
endi
if $dnode2Vnodes != null then
goto show1
endi endi
print =============== step3 start dnode2 print =============== step3 start dnode2
sql create dnode $hostname2 sql create dnode $hostname port 7200
system sh/exec.sh -n dnode2 -s start system sh/exec.sh -n dnode2 -s start
sleep 8000
$x = 0 $x = 0
show2: step3:
$x = $x + 1 $x = $x + 1
sleep 2000 sleep 1000
if $x == 10 then if $x == 10 then
return -1 print ====> dnode not ready!
return -1
endi endi
sql show dnodes -x show2 sql show dnodes
$dnode1Vnodes = $data2_1 print ===> $data00 $data01 $data02 $data03 $data04 $data05
print dnode1 $dnode1Vnodes print ===> $data10 $data11 $data12 $data13 $data14 $data15
$dnode2Vnodes = $data2_2 if $rows != 2 then
print dnode2 $dnode2Vnodes return -1
if $dnode1Vnodes != 2 then
goto show2
endi endi
if $dnode2Vnodes != 2 then if $data(1)[4] != ready then
goto show2 goto step3
endi
if $data(2)[4] != ready then
goto step3
endi endi
sql balance vgroup
sql show dnodes
print dnode1 openVnodes $data(1)[2]
print dnode2 openVnodes $data(2)[2]
if $data(1)[2] != 2 then
return -1
endi
if $data(2)[2] != 2 then
return -1
endi
print =============== step4 print =============== step4
$i = 1 $i = 1
......
...@@ -2,39 +2,46 @@ system sh/stop_dnodes.sh ...@@ -2,39 +2,46 @@ system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode3 -i 3 system sh/deploy.sh -n dnode3 -i 3
system sh/cfg.sh -n dnode1 -c walLevel -v 1 system sh/deploy.sh -n dnode4 -i 4
system sh/cfg.sh -n dnode2 -c walLevel -v 1 system sh/cfg.sh -n dnode1 -c supportVnodes -v 4
system sh/cfg.sh -n dnode3 -c walLevel -v 1 system sh/cfg.sh -n dnode2 -c supportVnodes -v 4
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 4 system sh/cfg.sh -n dnode3 -c supportVnodes -v 4
system sh/cfg.sh -n dnode2 -c maxtablesPerVnode -v 4 system sh/cfg.sh -n dnode4 -c supportVnodes -v 4
system sh/cfg.sh -n dnode3 -c maxtablesPerVnode -v 4
system sh/exec.sh -n dnode1 -s start
print ========== step1
system sh/exec.sh -n dnode1 -s start
sql connect sql connect
sql create dnode $hostname2 sql create dnode $hostname port 7200
sql create dnode $hostname3 sql create dnode $hostname port 7300
system sh/exec.sh -n dnode2 -s start system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start system sh/exec.sh -n dnode3 -s start
$x = 0 $x = 0
createDnode: step1:
$x = $x + 1 $x = $x + 1
sleep 1000 sleep 1000
if $x == 20 then if $x == 10 then
return -1 print ====> dnode not ready!
return -1
endi endi
sql show dnodes; sql show dnodes
if $data4_2 == offline then print ===> $data00 $data01 $data02 $data03 $data04 $data05
goto createDnode print ===> $data10 $data11 $data12 $data13 $data14 $data15
endi if $rows != 3 then
if $data4_3 == offline then return -1
goto createDnode endi
endi if $data(1)[4] != ready then
goto step1
endi
if $data(2)[4] != ready then
goto step1
endi
if $data(3)[4] != ready then
goto step1
endi
print ======================== dnode1 start print ======================== dnode1 start
$dbPrefix = d3_db $dbPrefix = d3_db
$tbPrefix = d3_tb $tbPrefix = d3_tb
$mtPrefix = d3_mt $mtPrefix = d3_mt
...@@ -47,7 +54,7 @@ $i = 0 ...@@ -47,7 +54,7 @@ $i = 0
$db = $dbPrefix . $i $db = $dbPrefix . $i
$mt = $mtPrefix . $i $mt = $mtPrefix . $i
sql create database $db sql create database $db vgroups 3
sql use $db sql use $db
sql create table $mt (ts timestamp, tbcol int) TAGS(tgcol int) sql create table $mt (ts timestamp, tbcol int) TAGS(tgcol int)
...@@ -73,26 +80,6 @@ if $rows != 3 then ...@@ -73,26 +80,6 @@ if $rows != 3 then
return -1 return -1
endi endi
sql show dnodes
$dnode1Vnodes = $data2_1
print dnode1 $dnode1Vnodes
$dnode2Vnodes = $data2_2
print dnode2 $dnode2Vnodes
$dnode3Vnodes = $data2_3
print dnode3 $dnode3Vnodes
if $dnode1Vnodes != 1 then
return -1
endi
if $dnode2Vnodes != 1 then
return -1
endi
if $dnode3Vnodes != 1 then
return -1
endi
sleep 100
print =============== step2 print =============== step2
$i = 1 $i = 1
$tb = $tbPrefix . $i $tb = $tbPrefix . $i
...@@ -124,20 +111,20 @@ if $data00 != $rowNum then ...@@ -124,20 +111,20 @@ if $data00 != $rowNum then
endi endi
print =============== step5 print =============== step5
sql select count(tbcol) as b from $tb interval(1m) sql select _wstartts, count(tbcol) as b from $tb interval(1m)
print ===> $data01 print ===> $data01
if $data01 != 1 then if $data01 != 1 then
return -1 return -1
endi endi
sql select count(tbcol) as b from $tb interval(1d) sql select _wstartts, count(tbcol) as b from $tb interval(1d)
print ===> $data01 print ===> $data01
if $data01 != $rowNum then if $data01 != $rowNum then
return -1 return -1
endi endi
print =============== step6 print =============== step6
sql select count(tbcol) as b from $tb where ts <= 1519833840000 interval(1m) sql select _wstartts, count(tbcol) as b from $tb where ts <= 1519833840000 interval(1m)
print ===> $data01 print ===> $data01
if $data01 != 1 then if $data01 != 1 then
return -1 return -1
...@@ -179,13 +166,13 @@ if $data00 != 25 then ...@@ -179,13 +166,13 @@ if $data00 != 25 then
endi endi
print =============== step9 print =============== step9
sql select count(tbcol) as b from $mt interval(1m) sql select _wstartts, count(tbcol) as b from $mt interval(1m)
print ===> $data01 print ===> $data01
if $data01 != 10 then if $data01 != 10 then
return -1 return -1
endi endi
sql select count(tbcol) as b from $mt interval(1d) sql select _wstartts, count(tbcol) as b from $mt interval(1d)
print ===> $data01 print ===> $data01
if $data01 != 200 then if $data01 != 200 then
return -1 return -1
...@@ -202,20 +189,10 @@ if $rows != $tbNum then ...@@ -202,20 +189,10 @@ if $rows != $tbNum then
return -1 return -1
endi endi
print =============== step11
sql select count(tbcol) as b from $mt where ts <= 1519833840000 interval(1m) group by tgcol
print ===> $data01
if $data01 != 1 then
return -1
endi
if $rows != 50 then
return -1
endi
print =============== clear print =============== clear
sql drop database $db sql drop database $db
sql show databases sql show databases
if $rows != 0 then if $rows != 2 then
return -1 return -1
endi endi
...@@ -223,7 +200,3 @@ system sh/exec.sh -n dnode1 -s stop -x SIGINT ...@@ -223,7 +200,3 @@ system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/exec.sh -n dnode3 -s stop -x SIGINT system sh/exec.sh -n dnode3 -s stop -x SIGINT
system sh/exec.sh -n dnode4 -s stop -x SIGINT system sh/exec.sh -n dnode4 -s stop -x SIGINT
system sh/exec.sh -n dnode5 -s stop -x SIGINT
system sh/exec.sh -n dnode6 -s stop -x SIGINT
system sh/exec.sh -n dnode7 -s stop -x SIGINT
system sh/exec.sh -n dnode8 -s stop -x SIGINT
\ No newline at end of file
...@@ -5,29 +5,22 @@ system sh/deploy.sh -n dnode3 -i 3 ...@@ -5,29 +5,22 @@ system sh/deploy.sh -n dnode3 -i 3
system sh/deploy.sh -n dnode4 -i 4 system sh/deploy.sh -n dnode4 -i 4
system sh/deploy.sh -n dnode5 -i 5 system sh/deploy.sh -n dnode5 -i 5
system sh/deploy.sh -n dnode6 -i 6 system sh/deploy.sh -n dnode6 -i 6
system sh/cfg.sh -n dnode1 -c supportVnodes -v 4
system sh/cfg.sh -n dnode1 -c walLevel -v 2 system sh/cfg.sh -n dnode2 -c supportVnodes -v 4
system sh/cfg.sh -n dnode2 -c walLevel -v 2 system sh/cfg.sh -n dnode3 -c supportVnodes -v 4
system sh/cfg.sh -n dnode3 -c walLevel -v 2 system sh/cfg.sh -n dnode4 -c supportVnodes -v 4
system sh/cfg.sh -n dnode4 -c walLevel -v 2 system sh/cfg.sh -n dnode5 -c supportVnodes -v 4
system sh/cfg.sh -n dnode5 -c walLevel -v 2 system sh/cfg.sh -n dnode6 -c supportVnodes -v 4
system sh/cfg.sh -n dnode6 -c walLevel -v 2
print ========== step1
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode2 -c maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode3 -c maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode4 -c maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode5 -c maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode6 -c maxtablesPerVnode -v 4
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
sql connect sql connect
sql create dnode $hostname2 sql create dnode $hostname port 7200
sql create dnode $hostname3 sql create dnode $hostname port 7300
sql create dnode $hostname4 sql create dnode $hostname port 7400
sql create dnode $hostname5 sql create dnode $hostname port 7500
sql create dnode $hostname6 sql create dnode $hostname port 7600
system sh/exec.sh -n dnode2 -s start system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start system sh/exec.sh -n dnode3 -s start
system sh/exec.sh -n dnode4 -s start system sh/exec.sh -n dnode4 -s start
...@@ -35,31 +28,41 @@ system sh/exec.sh -n dnode5 -s start ...@@ -35,31 +28,41 @@ system sh/exec.sh -n dnode5 -s start
system sh/exec.sh -n dnode6 -s start system sh/exec.sh -n dnode6 -s start
$x = 0 $x = 0
createDnode: step10:
$x = $x + 1 $x = $x + 1
sleep 1000 sleep 1000
if $x == 20 then if $x == 10 then
return -1 print ====> dnode not ready!
return -1
endi endi
sql show dnodes; sql show dnodes
if $data4_2 == offline then print ===> $data00 $data01 $data02 $data03 $data04 $data05
goto createDnode print ===> $data10 $data11 $data12 $data13 $data14 $data15
endi print ===> $data20 $data21 $data22 $data23 $data24 $data25
if $data4_3 == offline then print ===> $data30 $data31 $data32 $data33 $data34 $data35
goto createDnode if $rows != 6 then
endi return -1
if $data4_4 == offline then endi
goto createDnode if $data(1)[4] != ready then
endi goto step10
if $data4_5 == offline then endi
goto createDnode if $data(2)[4] != ready then
endi goto step10
if $data4_6 == offline then endi
goto createDnode if $data(3)[4] != ready then
endi goto step10
endi
if $data(4)[4] != ready then
goto step10
endi
if $data(5)[4] != ready then
goto step10
endi
if $data(6)[4] != ready then
goto step10
endi
print ======================== dnode1 start print ======================== dnode1 start
$dbPrefix = r3d6_db $dbPrefix = r3d6_db
$tbPrefix = r3d6_tb $tbPrefix = r3d6_tb
$mtPrefix = r3d6_mt $mtPrefix = r3d6_mt
...@@ -78,7 +81,7 @@ $i = 0 ...@@ -78,7 +81,7 @@ $i = 0
$db = $dbPrefix . $i $db = $dbPrefix . $i
$mt = $mtPrefix . $i $mt = $mtPrefix . $i
sql create database $db replica 3 sql create database $db replica 3 vgroups 3
sql use $db sql use $db
sql create table $mt (ts timestamp, tbcol int) TAGS(tgcol int) sql create table $mt (ts timestamp, tbcol int) TAGS(tgcol int)
...@@ -137,20 +140,20 @@ if $data00 != $rowNum then ...@@ -137,20 +140,20 @@ if $data00 != $rowNum then
endi endi
print =============== step5 print =============== step5
sql select count(tbcol) as b from $tb interval(1m) sql select _wstartts, count(tbcol) as b from $tb interval(1m)
print ===> $data01 print ===> $data01
if $data01 != 1 then if $data01 != 1 then
return -1 return -1
endi endi
sql select count(tbcol) as b from $tb interval(1d) sql select _wstartts, count(tbcol) as b from $tb interval(1d)
print ===> $data01 print ===> $data01
if $data01 != $rowNum then if $data01 != $rowNum then
return -1 return -1
endi endi
print =============== step6 print =============== step6
sql select count(tbcol) as b from $tb where ts <= 1519833840000 interval(1m) sql select _wstartts, count(tbcol) as b from $tb where ts <= 1519833840000 interval(1m)
print ===> $data01 print ===> $data01
if $data01 != 1 then if $data01 != 1 then
return -1 return -1
...@@ -192,13 +195,13 @@ if $data00 != 25 then ...@@ -192,13 +195,13 @@ if $data00 != 25 then
endi endi
print =============== step9 print =============== step9
#sql select count(tbcol) as b from $mt interval(1m) #sql select _wstartts, count(tbcol) as b from $mt interval(1m)
#print ===> $data01 #print ===> $data01
#if $data01 != 10 then #if $data01 != 10 then
# return -1 # return -1
#endi #endi
sql select count(tbcol) as b from $mt interval(1d) sql select _wstartts, count(tbcol) as b from $mt interval(1d)
print ===> $data01 print ===> $data01
if $data01 != 200 then if $data01 != 200 then
return -1 return -1
...@@ -215,23 +218,6 @@ if $rows != $tbNum then ...@@ -215,23 +218,6 @@ if $rows != $tbNum then
return -1 return -1
endi endi
print =============== step11
sql select count(tbcol) as b from $mt where ts <= 1519833840000 interval(1m) group by tgcol
print ===> $data01
if $data01 != 1 then
return -1
endi
if $rows != 50 then
return -1
endi
return
print =============== clear
sql drop database $db
sql show databases
if $rows != 0 then
return -1
endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/exec.sh -n dnode3 -s stop -x SIGINT system sh/exec.sh -n dnode3 -s stop -x SIGINT
......
system sh/stop_dnodes.sh system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1 system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 2 system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode3 -i 3 system sh/deploy.sh -n dnode3 -i 3
system sh/deploy.sh -n dnode4 -i 4 system sh/deploy.sh -n dnode4 -i 4
system sh/cfg.sh -n dnode1 -c walLevel -v 2 system sh/deploy.sh -n dnode5 -i 5
system sh/cfg.sh -n dnode2 -c walLevel -v 2 system sh/deploy.sh -n dnode6 -i 6
system sh/cfg.sh -n dnode3 -c walLevel -v 2 system sh/cfg.sh -n dnode1 -c supportVnodes -v 4
system sh/cfg.sh -n dnode4 -c walLevel -v 2 system sh/cfg.sh -n dnode2 -c supportVnodes -v 4
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 4 system sh/cfg.sh -n dnode3 -c supportVnodes -v 4
system sh/cfg.sh -n dnode2 -c maxtablesPerVnode -v 4 system sh/cfg.sh -n dnode4 -c supportVnodes -v 4
system sh/cfg.sh -n dnode3 -c maxtablesPerVnode -v 4 system sh/cfg.sh -n dnode5 -c supportVnodes -v 4
system sh/cfg.sh -n dnode4 -c maxtablesPerVnode -v 4 system sh/cfg.sh -n dnode6 -c supportVnodes -v 4
print ========== step1
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
sql connect sql connect
sql create dnode $hostname2 sql create dnode $hostname port 7200
sql create dnode $hostname3 sql create dnode $hostname port 7300
sql create dnode $hostname4 sql create dnode $hostname port 7400
system sh/exec.sh -n dnode2 -s start system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start system sh/exec.sh -n dnode3 -s start
system sh/exec.sh -n dnode4 -s start system sh/exec.sh -n dnode4 -s start
$x = 0 $x = 0
createDnode: step10:
$x = $x + 1 $x = $x + 1
sleep 1000 sleep 1000
if $x == 20 then if $x == 10 then
return -1 print ====> dnode not ready!
return -1
endi endi
sql show dnodes; sql show dnodes
if $data4_2 == offline then print ===> $data00 $data01 $data02 $data03 $data04 $data05
goto createDnode print ===> $data10 $data11 $data12 $data13 $data14 $data15
endi print ===> $data20 $data21 $data22 $data23 $data24 $data25
if $data4_3 == offline then print ===> $data30 $data31 $data32 $data33 $data34 $data35
goto createDnode if $rows != 4 then
endi return -1
if $data4_4 == offline then endi
goto createDnode if $data(1)[4] != ready then
endi goto step10
endi
if $data(2)[4] != ready then
goto step10
endi
if $data(3)[4] != ready then
goto step10
endi
if $data(4)[4] != ready then
goto step10
endi
print ======================== dnode1 start print ======================== dnode1 start
$dbPrefix = r3v3_db $dbPrefix = r3v3_db
$tbPrefix = r3v3_tb $tbPrefix = r3v3_tb
$mtPrefix = r3v3_mt $mtPrefix = r3v3_mt
...@@ -54,7 +65,7 @@ $i = 0 ...@@ -54,7 +65,7 @@ $i = 0
$db = $dbPrefix . $i $db = $dbPrefix . $i
$mt = $mtPrefix . $i $mt = $mtPrefix . $i
sql create database $db replica 3 sql create database $db replica 3 vgroups 3
sql use $db sql use $db
sql create table $mt (ts timestamp, tbcol int) TAGS(tgcol int) sql create table $mt (ts timestamp, tbcol int) TAGS(tgcol int)
...@@ -113,20 +124,20 @@ if $data00 != $rowNum then ...@@ -113,20 +124,20 @@ if $data00 != $rowNum then
endi endi
print =============== step5 print =============== step5
sql select count(tbcol) as b from $tb interval(1m) sql select _wstartts, count(tbcol) as b from $tb interval(1m)
print ===> $data01 print ===> $data01
if $data01 != 1 then if $data01 != 1 then
return -1 return -1
endi endi
sql select count(tbcol) as b from $tb interval(1d) sql select _wstartts, count(tbcol) as b from $tb interval(1d)
print ===> $data01 print ===> $data01
if $data01 != $rowNum then if $data01 != $rowNum then
return -1 return -1
endi endi
print =============== step6 print =============== step6
sql select count(tbcol) as b from $tb where ts <= 1519833840000 interval(1m) sql select _wstartts, count(tbcol) as b from $tb where ts <= 1519833840000 interval(1m)
print ===> $data01 print ===> $data01
if $data01 != 1 then if $data01 != 1 then
return -1 return -1
...@@ -169,13 +180,13 @@ if $data00 != 25 then ...@@ -169,13 +180,13 @@ if $data00 != 25 then
endi endi
print =============== step9 print =============== step9
sql select count(tbcol) as b from $mt interval(1m) sql select _wstartts, count(tbcol) as b from $mt interval(1m)
print ===> $data01 print ===> $data01
if $data01 != 10 then if $data01 != 10 then
return -1 return -1
endi endi
sql select count(tbcol) as b from $mt interval(1d) sql select _wstartts, count(tbcol) as b from $mt interval(1d)
print ===> $data01 print ===> $data01
if $data01 != 200 then if $data01 != 200 then
return -1 return -1
...@@ -192,23 +203,6 @@ if $rows != $tbNum then ...@@ -192,23 +203,6 @@ if $rows != $tbNum then
return -1 return -1
endi endi
print =============== step11
sql select count(tbcol) as b from $mt where ts <= 1519833840000 interval(1m) group by tgcol
print ===> $data01
if $data01 != 1 then
return -1
endi
if $rows != 50 then
return -1
endi
print =============== clear
sql drop database $db
sql show databases
if $rows != 0 then
return -1
endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/exec.sh -n dnode3 -s stop -x SIGINT system sh/exec.sh -n dnode3 -s stop -x SIGINT
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册