diff --git a/tests/script/unique/big/balance.sim b/tests/script/unique/big/balance.sim index a9092ac790550f523c934b4214bd89605e420414..91a7c538d27a30433aeea1fd1214e3c2d79283ec 100644 --- a/tests/script/unique/big/balance.sim +++ b/tests/script/unique/big/balance.sim @@ -321,6 +321,63 @@ if $data00 != $totalNum then goto show5 endi + +print ========== step6 +sleep 3000 +sql alter database db replica 1 + +$x = 0 +show6: + $x = $x + 1 + sleep 3000 + if $x == 10 then + return -1 + endi + +sql show dnodes +print dnode1 freeVnodes $data2_1 +print dnode4 freeVnodes $data2_4 +if $data2_1 != 2 then + goto show6 +endi +if $data2_4 != 2 then + goto show6 +endi + +sql reset query cache +sleep 1000 + +sql select count(*) from t10 +print select count(*) from t10 $data00 expect $rowNum +if $data00 != $rowNum then + goto show5 +endi + +sql select count(*) from t1010 +print select count(*) from t1010 $data00 expect $rowNum +if $data00 != $rowNum then + goto show5 +endi + +sql select count(*) from t2010 +print select count(*) from t2010 $data00 expect $rowNum +if $data00 != $rowNum then + goto show5 +endi + +sql select count(*) from t3010 +print select count(*) from t3010 $data00 expect $rowNum +if $data00 != $rowNum then + goto show5 +endi + +sql select count(*) from mt +print select count(*) from mt $data00 expect $rowNum +if $data00 != $totalNum then + goto show5 +endi + + 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 dnode3 -s stop -x SIGINT