Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
fe300f3c
T
TDengine
项目概览
慢慢CG
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
fe300f3c
编写于
6月 06, 2020
作者:
S
Shengliang Guan
提交者:
GitHub
6月 06, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2159 from taosdata/hotfix/test
[modify sim case]
上级
a0d8436a
768327df
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
97 addition
and
26 deletion
+97
-26
tests/script/unique/arbitrator/dn3_mn1_vnode_change.sim
tests/script/unique/arbitrator/dn3_mn1_vnode_change.sim
+97
-26
未找到文件。
tests/script/unique/arbitrator/dn3_mn1_vnode_change.sim
浏览文件 @
fe300f3c
...
@@ -93,14 +93,14 @@ if $data00 != $totalRows then
...
@@ -93,14 +93,14 @@ if $data00 != $totalRows then
return -1
return -1
endi
endi
print ============== step3: stop dnode
2
, and remove its vnodeX subdirector
print ============== step3: stop dnode
4
, and remove its vnodeX subdirector
system sh/exec.sh -n dnode
2
-s stop -x SIGINT
system sh/exec.sh -n dnode
4
-s stop -x SIGINT
sleep $sleepTimer
sleep $sleepTimer
wait_dnode
2
_offline_0:
wait_dnode
4
_offline_0:
sql show dnodes
sql show dnodes
if $rows != 4 then
if $rows != 4 then
sleep 2000
sleep 2000
goto wait_dnode
2
_offline_0
goto wait_dnode
4
_offline_0
endi
endi
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2
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
...
@@ -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
#print $data0_6 $data1_6 $data2_6 $data3_6 $data4_6
#$dnode1Status = $data4_1
#$dnode1Status = $data4_1
$dnode2Status = $data4_2
$dnode2Status = $data4_2
#
$dnode3Status = $data4_3
$dnode3Status = $data4_3
#
$dnode4Status = $data4_4
$dnode4Status = $data4_4
#$dnode5Status = $data4_5
#$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
sleep 2000
goto wait_dnode
2_offline_0
goto wait_dnode
4_vgroup_offline
endi
endi
system rm -rf ../../../sim/dnode2/data/vnode/*
system rm -rf ../../../sim/dnode4/data/vnode/*
sleep 1000
sleep 1000
print ============== step4: restart dnode
2
, waiting sync end
print ============== step4: restart dnode
4
, waiting sync end
system sh/exec.sh -n dnode
2
-s start
system sh/exec.sh -n dnode
4
-s start
sleep $sleepTimer
sleep $sleepTimer
wait_dnode
2
_reready:
wait_dnode
4
_reready:
sql show dnodes
sql show dnodes
if $rows != 4 then
if $rows != 4 then
sleep 2000
sleep 2000
goto wait_dnode
2
_reready
goto wait_dnode
4
_reready
endi
endi
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2
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
...
@@ -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
#print $data0_6 $data1_6 $data2_6 $data3_6 $data4_6
#$dnode1Status = $data4_1
#$dnode1Status = $data4_1
$dnode2Status = $data4_2
$dnode2Status = $data4_2
#
$dnode3Status = $data4_3
$dnode3Status = $data4_3
#
$dnode4Status = $data4_4
$dnode4Status = $data4_4
#$dnode5Status = $data4_5
#$dnode5Status = $data4_5
if $dnode
2
Status != ready then
if $dnode
4
Status != ready then
sleep 2000
sleep 2000
goto wait_dnode
2
_reready
goto wait_dnode
4
_reready
endi
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 dnode3 -s stop
system sh/exec.sh -n dnode4 -s stop
sleep $sleepTimer
sleep $sleepTimer
wait_dnode
34
_offline:
wait_dnode
23
_offline:
sql show dnodes
sql show dnodes
if $rows != 4 then
if $rows != 4 then
sleep 2000
sleep 2000
goto wait_dnode
34
_offline
goto wait_dnode
23
_offline
endi
endi
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1
print $data0_1 $data1_1 $data2_1 $data3_1 $data4_1
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2
print $data0_2 $data1_2 $data2_2 $data3_2 $data4_2
...
@@ -171,17 +218,41 @@ $dnode3Status = $data4_3
...
@@ -171,17 +218,41 @@ $dnode3Status = $data4_3
$dnode4Status = $data4_4
$dnode4Status = $data4_4
#$dnode5Status = $data4_5
#$dnode5Status = $data4_5
if $dnode2Status !=
ready
then
if $dnode2Status !=
offline
then
sleep 2000
sleep 2000
goto wait_dnode
34
_offline
goto wait_dnode
23
_offline
endi
endi
if $dnode3Status != offline then
if $dnode3Status != offline then
sleep 2000
sleep 2000
goto wait_dnode
34
_offline
goto wait_dnode
23
_offline
endi
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
sleep 2000
goto wait_dnode
34_offline
goto wait_dnode
4_vgroup_master
endi
endi
# check using select
# check using select
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录