Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
f38db7ad
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
f38db7ad
编写于
6月 02, 2022
作者:
haoranc
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
test: add testcase of muti-replica mnode
上级
57b1436d
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
42 addition
and
53 deletion
+42
-53
tests/script/tsim/sync/3Replica5VgElect3mnodedrop.sim
tests/script/tsim/sync/3Replica5VgElect3mnodedrop.sim
+42
-53
未找到文件。
tests/script/tsim/sync/3Replica5VgElect3mnodedrop.sim
浏览文件 @
f38db7ad
...
...
@@ -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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录