提交 f38db7ad 编写于 作者: haoranc's avatar haoranc

test: add testcase of muti-replica mnode

上级 57b1436d
......@@ -511,57 +511,7 @@ if $data[4][4] != ready then
goto check_dnode_ready3
endi
$loop_cnt = 0
check_mnode_ready_3:
$loop_cnt = $loop_cnt + 1
sleep 200
if $loop_cnt == 100 then
print ====> second mnode not ready!
return -1
endi
sql show mnodes
print ===> $rows $data[0][0] $data[0][1] $data[0][2] $data[0][3]
print ===> $rows $data[1][0] $data[1][1] $data[1][2] $data[1][3]
print ===> $rows $data[2][0] $data[2][1] $data[2][2] $data[2][3]
if $data[0][0] != 1 then
return -1
endi
if $data[0][2] == LEADER then
if $data[1][2] != FOLLOWER then
goto check_mnode_ready_3
endi
if $data[2][2] != FOLLOWER then
goto check_mnode_ready_3
endi
endi
if $data[1][2] == LEADER then
if $data[0][2] != FOLLOWER then
goto check_mnode_ready_3
endi
if $data[2][2] != FOLLOWER then
goto check_mnode_ready_3
endi
endi
if $data[2][2] == LEADER then
if $data[1][2] != FOLLOWER then
goto check_mnode_ready_3
endi
if $data[0][2] != FOLLOWER then
goto check_mnode_ready_3
endi
endi
# stop leader and drop dnode
system sh/exec.sh -n dnode1 -s stop
sleep 1000
system sh/exec.sh -n dnode1 -s start
sleep 1000
print ===> if create users sucessfully,then drop mnode leader
print ===> 1:if create users sucessfully,then drop mnode leader
sql create user chr pass '123'
$loop_cnt = 0
check_user_ready:
......@@ -592,13 +542,12 @@ endi
check_user_ready_suc:
$loop_cnt = 0
check_mnode_ready_3:
$loop_cnt = $loop_cnt + 1
sleep 200
if $loop_cnt == 100 then
print ====> third: mnode not ready!
print ====> second mnode not ready!
return -1
endi
sql show mnodes
......@@ -634,5 +583,45 @@ if $data[2][2] == LEADER then
endi
endi
sleep 2000
# stop leader and drop dnode
system sh/exec.sh -n dnode1 -s stop
sleep 2000
print ===> 2:if create users sucessfully,then drop mnode leader
sql create user chr2 pass '123'
$loop_cnt = 0
check_user_ready2:
$loop_cnt = $loop_cnt + 1
print $loop_cnt
sleep 200
if $loop_cnt == 300 then
print ====> vgroups not ready!
return -1
endi
sql show mnodes
print ===> $rows $data[0][0] $data[0][1] $data[0][2] $data[0][3]
print ===> $rows $data[1][0] $data[1][1] $data[1][2] $data[1][3]
print ===> $rows $data[2][0] $data[2][1] $data[2][2] $data[2][3]
sql show users
print ===> rows: $rows
print ===> $rows $data[0][0] $data[0][1] $data[0][2]
print ===> $rows $data[1][0] $data[1][1] $data[1][2]
print ===> $rows $data[2][0] $data[2][1] $data[2][2]
if $rows != 3 then
goto check_user_ready2
endi
if $data[0][0] == chr2 then
goto check_user_ready2_suc
elif $data[1][0] == chr2
goto check_user_ready2_suc
else
print ====> creating user failed
goto check_user_ready2
endi
check_user_ready2_suc:
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册