From 156f0df4c467f156795e39ab1a7a82dbd728acc5 Mon Sep 17 00:00:00 2001 From: slguan Date: Sun, 10 May 2020 19:03:06 +0800 Subject: [PATCH] scripts --- tests/script/unique/mnode/mgmt22.sim | 10 +++------- tests/script/unique/vnode/replica2_basic2.sim | 14 ++++++++++++++ 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/tests/script/unique/mnode/mgmt22.sim b/tests/script/unique/mnode/mgmt22.sim index 50692524cf..041a6734e2 100644 --- a/tests/script/unique/mnode/mgmt22.sim +++ b/tests/script/unique/mnode/mgmt22.sim @@ -8,7 +8,7 @@ system sh/cfg.sh -n dnode2 -c numOfMPeers -v 2 system sh/cfg.sh -n dnode3 -c numOfMPeers -v 2 print ============== step1 -system sh/exec_up.sh -n dnode1 -s start -t +system sh/exec_up.sh -n dnode1 -s start sleep 3000 sql connect @@ -20,7 +20,7 @@ if $data2_1 != master then endi print ============== step2 -system sh/exec_up.sh -n dnode2 -s start -t +system sh/exec_up.sh -n dnode2 -s start sql create dnode $hostname2 $x = 0 @@ -45,10 +45,6 @@ print ============== step3 sql_error drop dnode $hostname1 -x error1 print should not drop master -system sh/exec_up.sh -n dnode1 -s stop -x SIGINT -system sh/exec_up.sh -n dnode2 -s stop -x SIGINT -return - print ============== step4 system sh/exec_up.sh -n dnode1 -s stop -x SIGINT sql_error show mnodes @@ -83,7 +79,7 @@ if $data2_2 != slave then endi print ============== step7 -system sh/exec_up.sh -n dnode3 -s start -t +system sh/exec_up.sh -n dnode3 -s start sql create dnode $hostname3 sleep 5000 diff --git a/tests/script/unique/vnode/replica2_basic2.sim b/tests/script/unique/vnode/replica2_basic2.sim index a86071faaf..041db8249a 100644 --- a/tests/script/unique/vnode/replica2_basic2.sim +++ b/tests/script/unique/vnode/replica2_basic2.sim @@ -27,6 +27,7 @@ system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4 print ========= start dnodes system sh/exec_up.sh -n dnode1 -s start +sleep 3000 sql connect sql create dnode $hostname2 system sh/exec_up.sh -n dnode2 -s start @@ -89,6 +90,19 @@ if $data2_3 != 4 then return -1 endi +if $data4_1 != ready then + print dnode1 status should ready but is $data4_1 + return -1 +endi + +if $data4_2 != ready then + return -1 +endi + +if $data4_3 != ready then + return -1 +endi + print ========= step2 sql insert into d1.t1 values(now, 2) sql insert into d2.t2 values(now, 2) -- GitLab