提交 768327df 编写于 作者: H Hui Li

[modify sim case]

上级 8b993116
......@@ -93,14 +93,14 @@ if $data00 != $totalRows then
return -1
endi
print ============== step3: stop dnode2, and remove its vnodeX subdirector
system sh/exec.sh -n dnode2 -s stop -x SIGINT
print ============== step3: stop dnode4, and remove its vnodeX subdirector
system sh/exec.sh -n dnode4 -s stop -x SIGINT
sleep $sleepTimer
wait_dnode2_offline_0:
wait_dnode4_offline_0:
sql show dnodes
if $rows != 4 then
sleep 2000
goto wait_dnode2_offline_0
goto wait_dnode4_offline_0
endi
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2
......@@ -110,26 +110,49 @@ print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3
#print $data0_6 $data1_6 $data2_6 $data3_6 $data4_6
#$dnode1Status = $data4_1
$dnode2Status = $data4_2
#$dnode3Status = $data4_3
#$dnode4Status = $data4_4
$dnode3Status = $data4_3
$dnode4Status = $data4_4
#$dnode5Status = $data4_5
if $dnode2Status != offline then
if $dnode4Status != offline then
sleep 2000
goto wait_dnode4_offline_0
endi
wait_dnode4_vgroup_offline:
sql show vgroups
if $rows != 1 then
sleep 2000
goto wait_dnode4_vgroup_offline
endi
print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode4Vtatus = $data4_2
$dnode3Vtatus = $data7_2
if $dnode4Vtatus != offline then
sleep 2000
goto wait_dnode4_vgroup_offline
endi
if $dnode3Vtatus != master then
sleep 2000
goto wait_dnode2_offline_0
goto wait_dnode4_vgroup_offline
endi
system rm -rf ../../../sim/dnode2/data/vnode/*
system rm -rf ../../../sim/dnode4/data/vnode/*
sleep 1000
print ============== step4: restart dnode2, waiting sync end
system sh/exec.sh -n dnode2 -s start
print ============== step4: restart dnode4, waiting sync end
system sh/exec.sh -n dnode4 -s start
sleep $sleepTimer
wait_dnode2_reready:
wait_dnode4_reready:
sql show dnodes
if $rows != 4 then
sleep 2000
goto wait_dnode2_reready
goto wait_dnode4_reready
endi
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2
......@@ -139,25 +162,49 @@ print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3
#print $data0_6 $data1_6 $data2_6 $data3_6 $data4_6
#$dnode1Status = $data4_1
$dnode2Status = $data4_2
#$dnode3Status = $data4_3
#$dnode4Status = $data4_4
$dnode3Status = $data4_3
$dnode4Status = $data4_4
#$dnode5Status = $data4_5
if $dnode2Status != ready then
if $dnode4Status != ready then
sleep 2000
goto wait_dnode2_reready
goto wait_dnode4_reready
endi
print ============== step5: stop dnode3/dnode4, and check rows
wait_dnode4_vgroup_slave:
sql show vgroups
if $rows != 1 then
sleep 2000
goto wait_dnode4_vgroup_slave
endi
print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode4Vtatus = $data4_2
$dnode3Vtatus = $data7_2
print dnode4Vtatus: $dnode4Vtatus
print dnode3Vtatus: $dnode3Vtatus
if $dnode4Vtatus != slave then
sleep 2000
goto wait_dnode4_vgroup_slave
endi
if $dnode3Vtatus != master then
sleep 2000
goto wait_dnode4_vgroup_slave
endi
print ============== step5: stop dnode3/dnode2, and check rows
system sh/exec.sh -n dnode2 -s stop
system sh/exec.sh -n dnode3 -s stop
system sh/exec.sh -n dnode4 -s stop
sleep $sleepTimer
wait_dnode34_offline:
wait_dnode23_offline:
sql show dnodes
if $rows != 4 then
sleep 2000
goto wait_dnode34_offline
goto wait_dnode23_offline
endi
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2
......@@ -171,17 +218,41 @@ $dnode3Status = $data4_3
$dnode4Status = $data4_4
#$dnode5Status = $data4_5
if $dnode2Status != ready then
if $dnode2Status != offline then
sleep 2000
goto wait_dnode34_offline
goto wait_dnode23_offline
endi
if $dnode3Status != offline then
sleep 2000
goto wait_dnode34_offline
goto wait_dnode23_offline
endi
if $dnode4Status != offline then
if $dnode4Status != ready then
sleep 2000
goto wait_dnode23_offline
endi
wait_dnode4_vgroup_master:
sql show vgroups
if $rows != 1 then
sleep 2000
goto wait_dnode4_vgroup_master
endi
print show vgroups:
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1 $data5_1 $data6_1 $data7_1 $data8_1 $data9_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2 $data5_2 $data6_2 $data7_2 $data8_2 $data9_2
print $data0_3 $data1_3 $data2_3 $data3_3 $data4_3 $data5_3 $data6_3 $data7_3 $data8_3 $data9_3
$dnode4Vtatus = $data4_2
$dnode3Vtatus = $data7_2
print dnode4Vtatus: $dnode4Vtatus
print dnode3Vtatus: $dnode3Vtatus
if $dnode4Vtatus != master then
sleep 2000
goto wait_dnode4_vgroup_master
endi
if $dnode3Vtatus != offline then
sleep 2000
goto wait_dnode34_offline
goto wait_dnode4_vgroup_master
endi
# check using select
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册