From fd9a32b619e82cb8572648e76901512df636c543 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Mon, 11 May 2020 13:08:52 +0800 Subject: [PATCH] scripts --- tests/script/general/db/delete_reuse2.sim | 1 + tests/script/jenkins/basic.txt | 23 ++++----- tests/script/sh/deploy.sh | 2 +- .../script/unique/account/account_create.sim | 2 +- .../script/unique/account/account_delete.sim | 2 +- tests/script/unique/account/account_len.sim | 2 +- tests/script/unique/account/authority.sim | 2 +- tests/script/unique/account/basic.sim | 1 + tests/script/unique/account/paras.sim | 1 + tests/script/unique/account/pass_alter.sim | 2 +- tests/script/unique/account/pass_len.sim | 2 +- tests/script/unique/account/usage.sim | 1 + tests/script/unique/account/user_create.sim | 2 +- tests/script/unique/account/user_len.sim | 2 +- tests/script/unique/big/balance.sim | 48 +++++++++---------- tests/script/unique/big/maxvnodes.sim | 5 +- tests/script/unique/big/tcp.sim | 8 ++-- tests/script/unique/mnode/mgmt23.sim | 6 +-- tests/script/unique/mnode/mgmt25.sim | 4 +- tests/script/unique/mnode/mgmt26.sim | 6 +-- tests/script/unique/mnode/mgmt33.sim | 10 ++-- tests/script/unique/mnode/mgmt34.sim | 18 +++---- 22 files changed, 76 insertions(+), 74 deletions(-) diff --git a/tests/script/general/db/delete_reuse2.sim b/tests/script/general/db/delete_reuse2.sim index 0117d87104..d8b2763042 100644 --- a/tests/script/general/db/delete_reuse2.sim +++ b/tests/script/general/db/delete_reuse2.sim @@ -26,6 +26,7 @@ system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4 system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4 print ========= start dnodes +sleep 2000 system sh/exec.sh -n dnode1 -s start sleep 3000 sql connect diff --git a/tests/script/jenkins/basic.txt b/tests/script/jenkins/basic.txt index d96a1db2b4..44fda21d33 100644 --- a/tests/script/jenkins/basic.txt +++ b/tests/script/jenkins/basic.txt @@ -53,7 +53,7 @@ cd ../../../debug; make ./test.sh -f general/db/delete_reuse1.sim ./test.sh -f general/db/delete_reuse2.sim ./test.sh -f general/db/delete_reusevnode.sim -#./test.sh -f general/db/delete_reusevnode2.sim +./test.sh -f general/db/delete_reusevnode2.sim ./test.sh -f general/db/delete_writing1.sim ./test.sh -f general/db/delete_writing2.sim ./test.sh -f general/db/len.sim @@ -253,7 +253,7 @@ cd ../../../debug; make #./test.sh -u -f unique/big/balance.sim #./test.sh -u -f unique/big/maxvnodes.sim -#./test.sh -u -f unique/big/tcp.sim +./test.sh -u -f unique/big/tcp.sim ##./test.sh -u -f unique/cluster/balance1.sim ##./test.sh -u -f unique/cluster/balance2.sim @@ -298,13 +298,13 @@ cd ../../../debug; make #./test.sh -u -f unique/metrics/replica3_dnode6.sim #./test.sh -u -f unique/metrics/replica3_vnode3.sim -##./test.sh -u -f unique/mnode/mgmt22.sim -##./test.sh -u -f unique/mnode/mgmt23.sim -##./test.sh -u -f unique/mnode/mgmt24.sim -##./test.sh -u -f unique/mnode/mgmt25.sim -##./test.sh -u -f unique/mnode/mgmt26.sim -##./test.sh -u -f unique/mnode/mgmt33.sim -##./test.sh -u -f unique/mnode/mgmt34.sim +./test.sh -u -f unique/mnode/mgmt22.sim +./test.sh -u -f unique/mnode/mgmt23.sim +./test.sh -u -f unique/mnode/mgmt24.sim +./test.sh -u -f unique/mnode/mgmt25.sim +./test.sh -u -f unique/mnode/mgmt26.sim +./test.sh -u -f unique/mnode/mgmt33.sim +./test.sh -u -f unique/mnode/mgmt34.sim #./test.sh -u -f unique/mnode/mgmtr2.sim #./test.sh -u -f unique/mnode/secondIp.sim @@ -312,13 +312,10 @@ cd ../../../debug; make ##./test.sh -u -f unique/table/delete_part.sim -##./test.sh -u -f unique/vnode/replica2_basic2.sim -##./test.sh -u -f unique/vnode/replica3_basic.sim - #./test.sh -u -f unique/vnode/commit.sim #./test.sh -u -f unique/vnode/many.sim #./test.sh -u -f unique/vnode/replica2_basic.sim -##./test.sh -u -f unique/vnode/replica2_basic2.sim +./test.sh -u -f unique/vnode/replica2_basic2.sim #./test.sh -u -f unique/vnode/replica2_repeat.sim ##./test.sh -u -f unique/vnode/replica3_basic.sim #./test.sh -u -f unique/vnode/replica3_repeat.sim diff --git a/tests/script/sh/deploy.sh b/tests/script/sh/deploy.sh index 5587e3bb8c..bc18479896 100755 --- a/tests/script/sh/deploy.sh +++ b/tests/script/sh/deploy.sh @@ -99,7 +99,7 @@ echo "logDir $LOG_DIR" >> $TAOS_CFG echo "dDebugFlag 199" >> $TAOS_CFG echo "mDebugFlag 199" >> $TAOS_CFG echo "sdbDebugFlag 199" >> $TAOS_CFG -echo "rpcDebugFlag 135" >> $TAOS_CFG +echo "rpcDebugFlag 151" >> $TAOS_CFG echo "tmrDebugFlag 131" >> $TAOS_CFG echo "cDebugFlag 135" >> $TAOS_CFG echo "httpDebugFlag 135" >> $TAOS_CFG diff --git a/tests/script/unique/account/account_create.sim b/tests/script/unique/account/account_create.sim index d1d5ebece0..1966e1a7ce 100644 --- a/tests/script/unique/account/account_create.sim +++ b/tests/script/unique/account/account_create.sim @@ -3,8 +3,8 @@ system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c wallevel -v 0 system sh/exec_up.sh -n dnode1 -s start -sql connect sleep 3000 +sql connect print ============================ dnode1 start diff --git a/tests/script/unique/account/account_delete.sim b/tests/script/unique/account/account_delete.sim index 71a75a7b35..40075dc1a6 100644 --- a/tests/script/unique/account/account_delete.sim +++ b/tests/script/unique/account/account_delete.sim @@ -3,8 +3,8 @@ system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c wallevel -v 0 system sh/exec_up.sh -n dnode1 -s start -sql connect sleep 3000 +sql connect print ============= step1 sql create account oroot pass 'taosdata' diff --git a/tests/script/unique/account/account_len.sim b/tests/script/unique/account/account_len.sim index ae2db26d58..81d0f0bfb1 100644 --- a/tests/script/unique/account/account_len.sim +++ b/tests/script/unique/account/account_len.sim @@ -3,8 +3,8 @@ system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c wallevel -v 0 system sh/exec_up.sh -n dnode1 -s start -sql connect sleep 3000 +sql connect $i = 0 $dbPrefix = aldb diff --git a/tests/script/unique/account/authority.sim b/tests/script/unique/account/authority.sim index fe978a5827..2bb61cb0f2 100644 --- a/tests/script/unique/account/authority.sim +++ b/tests/script/unique/account/authority.sim @@ -4,8 +4,8 @@ system sh/cfg.sh -n dnode1 -c wallevel -v 0 system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 8 system sh/exec_up.sh -n dnode1 -s start -sql connect sleep 3000 +sql connect print ============= step1 diff --git a/tests/script/unique/account/basic.sim b/tests/script/unique/account/basic.sim index d06f7a15d9..adbc84d766 100644 --- a/tests/script/unique/account/basic.sim +++ b/tests/script/unique/account/basic.sim @@ -1,6 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/exec_up.sh -n dnode1 -s start +sleep 3000 sql connect print =============== show accounts diff --git a/tests/script/unique/account/paras.sim b/tests/script/unique/account/paras.sim index b2e540400c..70a423f70f 100644 --- a/tests/script/unique/account/paras.sim +++ b/tests/script/unique/account/paras.sim @@ -1,6 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/exec_up.sh -n dnode1 -s start +sleep 3000 sql connect print =============== show accounts diff --git a/tests/script/unique/account/pass_alter.sim b/tests/script/unique/account/pass_alter.sim index 936611833a..644548be0b 100644 --- a/tests/script/unique/account/pass_alter.sim +++ b/tests/script/unique/account/pass_alter.sim @@ -3,8 +3,8 @@ system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c wallevel -v 0 system sh/exec_up.sh -n dnode1 -s start -sql connect sleep 3000 +sql connect print ============= step1 sql create user read pass 'taosdata1' diff --git a/tests/script/unique/account/pass_len.sim b/tests/script/unique/account/pass_len.sim index f4f9c04964..370ea94200 100644 --- a/tests/script/unique/account/pass_len.sim +++ b/tests/script/unique/account/pass_len.sim @@ -3,8 +3,8 @@ system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c wallevel -v 0 system sh/exec_up.sh -n dnode1 -s start -sql connect sleep 3000 +sql connect $i = 0 $dbPrefix = apdb diff --git a/tests/script/unique/account/usage.sim b/tests/script/unique/account/usage.sim index f022380ac4..63c3d49f43 100644 --- a/tests/script/unique/account/usage.sim +++ b/tests/script/unique/account/usage.sim @@ -1,6 +1,7 @@ system sh/stop_dnodes.sh system sh/deploy.sh -n dnode1 -i 1 system sh/exec_up.sh -n dnode1 -s start +sleep 3000 sql connect print =============== show accounts diff --git a/tests/script/unique/account/user_create.sim b/tests/script/unique/account/user_create.sim index 789035cfcc..2a64786225 100644 --- a/tests/script/unique/account/user_create.sim +++ b/tests/script/unique/account/user_create.sim @@ -3,8 +3,8 @@ system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c wallevel -v 0 system sh/exec_up.sh -n dnode1 -s start -sql connect sleep 3000 +sql connect print =============== step1 sql show users diff --git a/tests/script/unique/account/user_len.sim b/tests/script/unique/account/user_len.sim index 918551fa66..1163ac2e4b 100644 --- a/tests/script/unique/account/user_len.sim +++ b/tests/script/unique/account/user_len.sim @@ -3,8 +3,8 @@ system sh/deploy.sh -n dnode1 -i 1 system sh/cfg.sh -n dnode1 -c wallevel -v 0 system sh/exec_up.sh -n dnode1 -s start -sql connect sleep 3000 +sql connect $i = 0 $dbPrefix = lm_us_db diff --git a/tests/script/unique/big/balance.sim b/tests/script/unique/big/balance.sim index 52199f046e..4b0a6cd0bf 100644 --- a/tests/script/unique/big/balance.sim +++ b/tests/script/unique/big/balance.sim @@ -20,7 +20,7 @@ system sh/cfg.sh -n dnode5 -c numOfTotalVnodes -v 4 system sh/cfg.sh -n dnode5 -c maxtablesPerVnode -v 1000 print =============== prepare data -system sh/exec.sh -n dnode1 -s start +system sh/exec_up.sh -n dnode1 -s start sleep 3000 sql connect @@ -87,7 +87,7 @@ endi print ========== step1 sql create dnode $hostname2 -system sh/exec.sh -n dnode2 -s start +system sh/exec_up.sh -n dnode2 -s start $x = 0 show1: @@ -98,12 +98,12 @@ show1: endi sql show dnodes -print dnode1 freeVnodes $data3_192.168.0.1 -print dnode2 freeVnodes $data3_192.168.0.2 -if $data3_192.168.0.1 != 2 then +print dnode1 openvnodes $data2_1 +print dnode2 openvnodes $data2_2 +if $data2_1 != 2 then goto show1 endi -if $data3_192.168.0.2 != 2 then +if $data2_2 != 2 then goto show1 endi @@ -139,7 +139,7 @@ endi print ========== step2 sql create dnode $hostname3 -system sh/exec.sh -n dnode3 -s start +system sh/exec_up.sh -n dnode3 -s start sleep 10000 print ========== step3 @@ -154,20 +154,20 @@ show3: endi sql show dnodes -print dnode1 freeVnodes $data3_192.168.0.1 -print dnode2 freeVnodes $data3_192.168.0.2 -print dnode3 freeVnodes $data3_192.168.0.3 -if $data3_192.168.0.1 != 2 then +print dnode1 freeVnodes $data2_1 +print dnode2 freeVnodes $data2_2 +print dnode3 freeVnodes $data2_3 +if $data2_1 != 2 then goto show3 endi -if $data3_192.168.0.2 != NULL then +if $data2_2 != NULL then goto show3 endi -if $data3_192.168.0.3 != 2 then +if $data2_3 != 2 then goto show3 endi -system sh/exec.sh -n dnode2 -s stop -x SIGINT +system sh/exec_up.sh -n dnode2 -s stop -x SIGINT sql select count(*) from t10 print select count(*) from t10 $data00 expect $rowNum @@ -211,16 +211,16 @@ show4: endi sql show dnodes -print dnode1 freeVnodes $data3_192.168.0.1 -print dnode3 freeVnodes $data3_192.168.0.3 -if $data3_192.168.0.1 != 0 then +print dnode1 freeVnodes $data2_1 +print dnode3 freeVnodes $data2_3 +if $data2_1 != 0 then goto show4 endi -if $data3_192.168.0.3 != NULL then +if $data2_3 != NULL then goto show4 endi -system sh/exec.sh -n dnode3 -s stop -x SIGINT +system sh/exec_up.sh -n dnode3 -s stop -x SIGINT sql select count(*) from t10 print select count(*) from t10 $data00 expect $rowNum @@ -255,7 +255,7 @@ endi print ========== step5 sql alter database db replica 2 sql create dnode $hostname4 -system sh/exec.sh -n dnode4 -s start +system sh/exec_up.sh -n dnode4 -s start $x = 0 show5: @@ -266,12 +266,12 @@ show5: endi sql show dnodes -print dnode1 freeVnodes $data3_192.168.0.1 -print dnode4 freeVnodes $data3_192.168.0.4 -if $data3_192.168.0.1 != 0 then +print dnode1 freeVnodes $data2_1 +print dnode4 freeVnodes $data2_4 +if $data2_1 != 0 then goto show5 endi -if $data3_192.168.0.4 != 0 then +if $data2_4 != 0 then goto show5 endi diff --git a/tests/script/unique/big/maxvnodes.sim b/tests/script/unique/big/maxvnodes.sim index 00995ba32c..b0a0119ca7 100644 --- a/tests/script/unique/big/maxvnodes.sim +++ b/tests/script/unique/big/maxvnodes.sim @@ -10,7 +10,8 @@ system sh/cfg.sh -n dnode1 -c maxShellConns -v 100000 system sh/cfg.sh -n dnode1 -c maxMgmtConnections -v 100000 print ========== prepare data -system sh/exec.sh -n dnode1 -s start +system sh/exec_up.sh -n dnode1 -s start +sleep 3000 sql connect sql create database db sql use db @@ -49,7 +50,7 @@ system sh/cfg.sh -n dnode2 -c maxMgmtConnections -v 100000 print ========== step2 sql create dnode $hostname2 -system sh/exec.sh -n dnode2 -s start +system sh/exec_up.sh -n dnode2 -s start $x = 0 show3: diff --git a/tests/script/unique/big/tcp.sim b/tests/script/unique/big/tcp.sim index 1fb414ec74..590035c0f8 100644 --- a/tests/script/unique/big/tcp.sim +++ b/tests/script/unique/big/tcp.sim @@ -14,8 +14,8 @@ system sh/cfg.sh -n dnode1 -c adminDebugFlag -v 131 system sh/cfg.sh -n dnode1 -c httpDebugFlag -v 135 system sh/cfg.sh -n dnode1 -c debugFlag -v 131 -system sh/exec.sh -n dnode1 -s start - +system sh/exec_up.sh -n dnode1 -s start +sleep 3000 sql connect print ======================== dnode1 start @@ -52,7 +52,7 @@ while $i < $tbNum endw $i = 0 -while $i < 100 +while $i < 10 print =============== step3 $i sql select count(*) from $mt print ===> $data00 $data01 @@ -83,7 +83,7 @@ while $i < $tbNum endw $i = 0 -while $i < 100 +while $i < 10 print =============== step5 $i sql select count(*) from $mt where tgcol < 20200 print ===> $data00 $data01 diff --git a/tests/script/unique/mnode/mgmt23.sim b/tests/script/unique/mnode/mgmt23.sim index 99d9159573..8c144dd0c4 100644 --- a/tests/script/unique/mnode/mgmt23.sim +++ b/tests/script/unique/mnode/mgmt23.sim @@ -59,7 +59,7 @@ endi if $dnode2Role != slave then return -1 endi -if $dnode3Role != NULL then +if $dnode3Role != null then return -1 endi @@ -78,7 +78,7 @@ print dnode3 ==> $dnode3Role if $dnode1Role != master then return -1 endi -if $dnode2Role != NULL then +if $dnode2Role != null then return -1 endi if $dnode3Role != slave then @@ -106,7 +106,7 @@ print dnode3 ==> $dnode3Role if $dnode1Role != master then return -1 endi -if $dnode2Role != NULL then +if $dnode2Role != null then return -1 endi if $dnode3Role != slave then diff --git a/tests/script/unique/mnode/mgmt25.sim b/tests/script/unique/mnode/mgmt25.sim index ba545f9479..8c8eeba466 100644 --- a/tests/script/unique/mnode/mgmt25.sim +++ b/tests/script/unique/mnode/mgmt25.sim @@ -59,7 +59,7 @@ endi if $dnode2Role != slave then return -1 endi -if $dnode3Role != NULL then +if $dnode3Role != null then return -1 endi @@ -78,7 +78,7 @@ print dnode3 ==> $dnode3Role if $dnode1Role != master then return -1 endi -if $dnode2Role != NULL then +if $dnode2Role != null then return -1 endi if $dnode3Role != slave then diff --git a/tests/script/unique/mnode/mgmt26.sim b/tests/script/unique/mnode/mgmt26.sim index e5ead5bb39..373a0abaed 100644 --- a/tests/script/unique/mnode/mgmt26.sim +++ b/tests/script/unique/mnode/mgmt26.sim @@ -59,7 +59,7 @@ endi if $dnode2Role != slave then return -1 endi -if $dnode3Role != NULL then +if $dnode3Role != null then return -1 endi @@ -79,7 +79,7 @@ print dnode3 ==> $dnode3Role if $dnode1Role != master then return -1 endi -if $dnode2Role != NULL then +if $dnode2Role != null then return -1 endi if $dnode3Role != slave then @@ -106,7 +106,7 @@ print dnode3 ==> $dnode3Role if $dnode1Role != master then return -1 endi -if $dnode2Role != NULL then +if $dnode2Role != null then return -1 endi if $dnode3Role != slave then diff --git a/tests/script/unique/mnode/mgmt33.sim b/tests/script/unique/mnode/mgmt33.sim index 36b7ba8139..e3a62a2d22 100644 --- a/tests/script/unique/mnode/mgmt33.sim +++ b/tests/script/unique/mnode/mgmt33.sim @@ -18,10 +18,10 @@ print dnode3 ==> $data3_3 if $data2_1 != master then return -1 endi -if $data3_2 != NULL then +if $data3_2 != null then return -1 endi -if $data3_3 != NULL then +if $data3_3 != null then return -1 endi @@ -44,7 +44,7 @@ endi if $dnode2Role != slave then return -1 endi -if $dnode3Role != NULL then +if $dnode3Role != null then return -1 endi @@ -86,7 +86,7 @@ print dnode3 ==> $dnode3Role if $dnode1Role != master then return -1 endi -if $dnode2Role != NULL then +if $dnode2Role != null then return -1 endi if $dnode3Role != slave then @@ -156,7 +156,7 @@ print dnode1 ==> $dnode1Role print dnode2 ==> $dnode2Role print dnode3 ==> $dnode3Role -if $dnode1Role != NULL then +if $dnode1Role != null then return -1 endi #if $dnode2Role != master then diff --git a/tests/script/unique/mnode/mgmt34.sim b/tests/script/unique/mnode/mgmt34.sim index 1139daea1c..4409c825c8 100644 --- a/tests/script/unique/mnode/mgmt34.sim +++ b/tests/script/unique/mnode/mgmt34.sim @@ -22,10 +22,10 @@ print dnode3 ==> $data3_3 if $data2_1 != master then return -1 endi -if $data3_2 != NULL then +if $data3_2 != null then return -1 endi -if $data3_3 != NULL then +if $data3_3 != null then return -1 endi @@ -50,10 +50,10 @@ endi if $dnode2Role != slave then return -1 endi -if $dnode3Role != NULL then +if $dnode3Role != null then return -1 endi -if $dnode4Role != NULL then +if $dnode4Role != null then return -1 endi @@ -81,7 +81,7 @@ endi if $dnode3Role != slave then return -1 endi -if $dnode4Role != NULL then +if $dnode4Role != null then return -1 endi @@ -110,7 +110,7 @@ endi if $dnode3Role != slave then return -1 endi -if $dnode4Role != NULL then +if $dnode4Role != null then return -1 endi @@ -131,7 +131,7 @@ print dnode4 ==> $dnode4Role if $dnode1Role != master then return -1 endi -if $dnode2Role != NULL then +if $dnode2Role != null then return -1 endi if $dnode3Role != slave then @@ -165,7 +165,7 @@ print dnode4 ==> $dnode4Role if $dnode1Role != master then return -1 endi -if $dnode2Role != NULL then +if $dnode2Role != null then return -1 endi if $dnode3Role != slave then @@ -207,7 +207,7 @@ print dnode2 ==> $dnode2Role print dnode3 ==> $dnode3Role print dnode4 ==> $dnode4Role -if $dnode1Role != NULL then +if $dnode1Role != null then return -1 endi if $dnode2Role != slave then -- GitLab