Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
慢慢CG
TDengine
提交
b340e374
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看板
提交
b340e374
编写于
12月 23, 2020
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
TD-2529 adjust scripts
上级
995a6b90
变更
20
隐藏空白更改
内联
并排
Showing
20 changed file
with
934 addition
and
450 deletion
+934
-450
tests/script/unique/arbitrator/dn3_mn1_r3_vnode_delDir.sim
tests/script/unique/arbitrator/dn3_mn1_r3_vnode_delDir.sim
+4
-2
tests/script/unique/arbitrator/dn3_mn1_vnode_nomaster.sim
tests/script/unique/arbitrator/dn3_mn1_vnode_nomaster.sim
+5
-3
tests/script/unique/cluster/balance3.sim
tests/script/unique/cluster/balance3.sim
+142
-92
tests/script/unique/db/replica_add12.sim
tests/script/unique/db/replica_add12.sim
+61
-58
tests/script/unique/db/replica_add13.sim
tests/script/unique/db/replica_add13.sim
+44
-40
tests/script/unique/db/replica_add23.sim
tests/script/unique/db/replica_add23.sim
+44
-40
tests/script/unique/db/replica_part.sim
tests/script/unique/db/replica_part.sim
+42
-29
tests/script/unique/db/replica_reduce21.sim
tests/script/unique/db/replica_reduce21.sim
+31
-18
tests/script/unique/db/replica_reduce31.sim
tests/script/unique/db/replica_reduce31.sim
+65
-26
tests/script/unique/db/replica_reduce32.sim
tests/script/unique/db/replica_reduce32.sim
+130
-32
tests/script/unique/mnode/mgmt20.sim
tests/script/unique/mnode/mgmt20.sim
+2
-3
tests/script/unique/mnode/mgmt22.sim
tests/script/unique/mnode/mgmt22.sim
+6
-8
tests/script/unique/mnode/mgmt23.sim
tests/script/unique/mnode/mgmt23.sim
+25
-16
tests/script/unique/mnode/mgmt33.sim
tests/script/unique/mnode/mgmt33.sim
+64
-26
tests/script/unique/mnode/mgmt34.sim
tests/script/unique/mnode/mgmt34.sim
+74
-35
tests/script/unique/mnode/mgmtr2.sim
tests/script/unique/mnode/mgmtr2.sim
+12
-9
tests/script/unique/vnode/many.sim
tests/script/unique/vnode/many.sim
+31
-1
tests/script/unique/vnode/replica2_repeat.sim
tests/script/unique/vnode/replica2_repeat.sim
+33
-2
tests/script/unique/vnode/replica3_basic.sim
tests/script/unique/vnode/replica3_basic.sim
+82
-8
tests/script/unique/vnode/replica3_repeat.sim
tests/script/unique/vnode/replica3_repeat.sim
+37
-2
未找到文件。
tests/script/unique/arbitrator/dn3_mn1_r3_vnode_delDir.sim
浏览文件 @
b340e374
...
@@ -360,12 +360,14 @@ print ============== step7: stop dnode3/dnode2, and cluster unable to provide se
...
@@ -360,12 +360,14 @@ print ============== step7: stop dnode3/dnode2, and cluster unable to provide se
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/exec.sh -n dnode3 -s stop -x SIGINT
system sh/exec.sh -n dnode3 -s stop -x SIGINT
sleep 3000
sleep 3000
sql_error select count(*) from $stb
sql select count(*) from $stb -x s71
s71:
print ============== step8: restart dnode2, and cluster Still unable to provide services
print ============== step8: restart dnode2, and cluster Still unable to provide services
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode2 -s start
sleep 3000
sleep 3000
sql_error select count(*) from $stb
sql select count(*) from $stb -x s81
s81:
print ============== step9: restart dnode3, and cluster Resume service delivery
print ============== step9: restart dnode3, and cluster Resume service delivery
system sh/exec.sh -n dnode3 -s start
system sh/exec.sh -n dnode3 -s start
...
...
tests/script/unique/arbitrator/dn3_mn1_vnode_nomaster.sim
浏览文件 @
b340e374
...
@@ -158,13 +158,15 @@ if $dnode4Vtatus != offline then
...
@@ -158,13 +158,15 @@ if $dnode4Vtatus != offline then
sleep 2000
sleep 2000
goto wait_dnode4_vgroup_offline
goto wait_dnode4_vgroup_offline
endi
endi
if $dnode3Vtatus !=
unsynced
then
if $dnode3Vtatus !=
master
then
sleep 2000
sleep 2000
goto wait_dnode4_vgroup_offline
goto wait_dnode4_vgroup_offline
endi
endi
sql_error select count(*) from $stb
sql select count(*) from $stb -x s31
sql_error insert into $tb values (now, 9988)
s31:
#sql_error insert into $tb values (now, 9988) -x s32
#s32:
print ============== step4: restart dnode2, then create database with replica 2, and create table, insert data
print ============== step4: restart dnode2, then create database with replica 2, and create table, insert data
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode2 -s start
...
...
tests/script/unique/cluster/balance3.sim
浏览文件 @
b340e374
...
@@ -7,7 +7,6 @@ system sh/deploy.sh -n dnode4 -i 4
...
@@ -7,7 +7,6 @@ system sh/deploy.sh -n dnode4 -i 4
system sh/deploy.sh -n dnode5 -i 5
system sh/deploy.sh -n dnode5 -i 5
system sh/deploy.sh -n dnode6 -i 6
system sh/deploy.sh -n dnode6 -i 6
system sh/deploy.sh -n dnode7 -i 7
system sh/deploy.sh -n dnode7 -i 7
system sh/deploy.sh -n dnode8 -i 8
system sh/cfg.sh -n dnode1 -c numOfMnodes -v 3
system sh/cfg.sh -n dnode1 -c numOfMnodes -v 3
system sh/cfg.sh -n dnode2 -c numOfMnodes -v 3
system sh/cfg.sh -n dnode2 -c numOfMnodes -v 3
...
@@ -16,7 +15,6 @@ system sh/cfg.sh -n dnode4 -c numOfMnodes -v 3
...
@@ -16,7 +15,6 @@ system sh/cfg.sh -n dnode4 -c numOfMnodes -v 3
system sh/cfg.sh -n dnode5 -c numOfMnodes -v 3
system sh/cfg.sh -n dnode5 -c numOfMnodes -v 3
system sh/cfg.sh -n dnode6 -c numOfMnodes -v 3
system sh/cfg.sh -n dnode6 -c numOfMnodes -v 3
system sh/cfg.sh -n dnode7 -c numOfMnodes -v 3
system sh/cfg.sh -n dnode7 -c numOfMnodes -v 3
system sh/cfg.sh -n dnode8 -c numOfMnodes -v 3
system sh/cfg.sh -n dnode1 -c mnodeEqualVnodeNum -v 0
system sh/cfg.sh -n dnode1 -c mnodeEqualVnodeNum -v 0
system sh/cfg.sh -n dnode2 -c mnodeEqualVnodeNum -v 0
system sh/cfg.sh -n dnode2 -c mnodeEqualVnodeNum -v 0
...
@@ -25,7 +23,6 @@ system sh/cfg.sh -n dnode4 -c mnodeEqualVnodeNum -v 0
...
@@ -25,7 +23,6 @@ system sh/cfg.sh -n dnode4 -c mnodeEqualVnodeNum -v 0
system sh/cfg.sh -n dnode5 -c mnodeEqualVnodeNum -v 0
system sh/cfg.sh -n dnode5 -c mnodeEqualVnodeNum -v 0
system sh/cfg.sh -n dnode6 -c mnodeEqualVnodeNum -v 0
system sh/cfg.sh -n dnode6 -c mnodeEqualVnodeNum -v 0
system sh/cfg.sh -n dnode7 -c mnodeEqualVnodeNum -v 0
system sh/cfg.sh -n dnode7 -c mnodeEqualVnodeNum -v 0
system sh/cfg.sh -n dnode8 -c mnodeEqualVnodeNum -v 0
system sh/cfg.sh -n dnode1 -c wallevel -v 1
system sh/cfg.sh -n dnode1 -c wallevel -v 1
system sh/cfg.sh -n dnode2 -c wallevel -v 1
system sh/cfg.sh -n dnode2 -c wallevel -v 1
...
@@ -34,19 +31,52 @@ system sh/cfg.sh -n dnode4 -c wallevel -v 1
...
@@ -34,19 +31,52 @@ system sh/cfg.sh -n dnode4 -c wallevel -v 1
system sh/cfg.sh -n dnode5 -c wallevel -v 1
system sh/cfg.sh -n dnode5 -c wallevel -v 1
system sh/cfg.sh -n dnode6 -c wallevel -v 1
system sh/cfg.sh -n dnode6 -c wallevel -v 1
system sh/cfg.sh -n dnode7 -c wallevel -v 1
system sh/cfg.sh -n dnode7 -c wallevel -v 1
system sh/cfg.sh -n dnode8 -c wallevel -v 1
print ============== step1
print ============== step1
print ========= start dnode1
print ========= start dnode1
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sql connect
sql connect
sleep 2001
sql create dnode $hostname2
sql create dnode $hostname2
sql create dnode $hostname3
sql create dnode $hostname3
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start
system sh/exec.sh -n dnode3 -s start
sleep 3001
$x = 0
step1:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show dnodes
print dnode1 $data4_1
print dnode2 $data4_2
print dnode3 $data4_3
if $data4_1 != ready then
goto step1
endi
if $data4_2 != ready then
goto step1
endi
if $data4_3 != ready then
goto step1
endi
sql show mnodes
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
goto step1
endi
if $data2_2 != slave then
goto step1
endi
if $data2_3 != slave then
goto step1
endi
sql create database c_b3_d1 replica 3
sql create database c_b3_d1 replica 3
sql use c_b3_d1
sql use c_b3_d1
...
@@ -89,8 +119,6 @@ $dnode2Vnodes = $data2_2
...
@@ -89,8 +119,6 @@ $dnode2Vnodes = $data2_2
print dnode2 $dnode2Vnodes
print dnode2 $dnode2Vnodes
$dnode3Vnodes = $data2_3
$dnode3Vnodes = $data2_3
print dnode3 $dnode3Vnodes
print dnode3 $dnode3Vnodes
$dnode4Vnodes = $data2_4
print dnode4 $dnode4Vnodes
if $dnode1Vnodes != 3 then
if $dnode1Vnodes != 3 then
goto show1
goto show1
...
@@ -101,30 +129,22 @@ endi
...
@@ -101,30 +129,22 @@ endi
if $dnode3Vnodes != 3 then
if $dnode3Vnodes != 3 then
goto show1
goto show1
endi
endi
if $dnode4Vnodes != null then
goto show1
endi
sql show mnodes
sql show mnodes
print dnode1 ==> $data2_1
print dnode1 ==> $data2_1
print dnode2 ==> $data2_2
print dnode2 ==> $data2_2
print dnode3 ==> $data2_3
print dnode3 ==> $data2_3
print dnode4 ==> $data2_4
print dnode5 ==> $data2_5
print dnode6 ==> $data2_6
print dnode7 ==> $data2_7
print ============================== step2
print ============================== step2
print ========= start dnode4
print ========= start dnode4
sql create dnode $hostname4
sql create dnode $hostname4
system sh/exec.sh -n dnode4 -s start
system sh/exec.sh -n dnode4 -s start
sleep 9000
$x = 0
$x = 0
show2:
show2:
$x = $x + 1
$x = $x + 1
sleep
2
000
sleep
1
000
if $x ==
2
0 then
if $x ==
4
0 then
return -1
return -1
endi
endi
sql show dnodes -x show2
sql show dnodes -x show2
...
@@ -145,21 +165,16 @@ sql show mnodes
...
@@ -145,21 +165,16 @@ sql show mnodes
print dnode1 ==> $data2_1
print dnode1 ==> $data2_1
print dnode2 ==> $data2_2
print dnode2 ==> $data2_2
print dnode3 ==> $data2_3
print dnode3 ==> $data2_3
print dnode4 ==> $data2_4
print dnode5 ==> $data2_5
print dnode6 ==> $data2_6
print dnode7 ==> $data2_7
print ============================== step3
print ============================== step3
print ========= drop dnode2
print ========= drop dnode2
sql drop dnode $hostname2
sql drop dnode $hostname2
sleep 9000
$x = 0
$x = 0
show3:
show3:
$x = $x + 1
$x = $x + 1
sleep
2
000
sleep
1
000
if $x ==
2
0 then
if $x ==
4
0 then
return -1
return -1
endi
endi
sql show dnodes -x show3
sql show dnodes -x show3
...
@@ -189,25 +204,21 @@ sql show mnodes
...
@@ -189,25 +204,21 @@ sql show mnodes
print dnode1 ==> $data2_1
print dnode1 ==> $data2_1
print dnode2 ==> $data2_2
print dnode2 ==> $data2_2
print dnode3 ==> $data2_3
print dnode3 ==> $data2_3
print dnode4 ==> $data2_4
print dnode5 ==> $data2_5
print dnode6 ==> $data2_6
print dnode7 ==> $data2_7
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
print ============================== step4
print ============================== step4
sql create dnode $hostname5
sql create dnode $hostname5
system sh/exec.sh -n dnode5 -s start
system sh/exec.sh -n dnode5 -s start
sleep 10000
$x = 0
$x = 0
show4:
show4:
$x = $x + 1
$x = $x + 1
sleep
2
000
sleep
1
000
if $x ==
2
0 then
if $x ==
4
0 then
return -1
return -1
endi
endi
sql show dnodes -x show4
sql show dnodes -x show4
$dnode1Vnodes = $data2_1
$dnode1Vnodes = $data2_1
print dnode1 $dnode1Vnodes
print dnode1 $dnode1Vnodes
...
@@ -228,8 +239,10 @@ print dnode2 ==> $data2_2
...
@@ -228,8 +239,10 @@ print dnode2 ==> $data2_2
print dnode3 ==> $data2_3
print dnode3 ==> $data2_3
print dnode4 ==> $data2_4
print dnode4 ==> $data2_4
print dnode5 ==> $data2_5
print dnode5 ==> $data2_5
print dnode6 ==> $data2_6
print dnode7 ==> $data2_7
if $data2_4 != slave then
goto show4
endi
print ============================== step5
print ============================== step5
print ========= drop dnode3
print ========= drop dnode3
...
@@ -239,8 +252,8 @@ sleep 9000
...
@@ -239,8 +252,8 @@ sleep 9000
$x = 0
$x = 0
show5:
show5:
$x = $x + 1
$x = $x + 1
sleep
2
000
sleep
1
000
if $x ==
2
0 then
if $x ==
4
0 then
return -1
return -1
endi
endi
sql show dnodes -x show5
sql show dnodes -x show5
...
@@ -277,16 +290,19 @@ print dnode5 ==> $data2_5
...
@@ -277,16 +290,19 @@ print dnode5 ==> $data2_5
print dnode6 ==> $data2_6
print dnode6 ==> $data2_6
print dnode7 ==> $data2_7
print dnode7 ==> $data2_7
if $data2_5 != slave then
goto show5
endi
print ============================== step6
print ============================== step6
sql create dnode $hostname6
sql create dnode $hostname6
system sh/exec.sh -n dnode6 -s start
system sh/exec.sh -n dnode6 -s start
sleep 9000
$x = 0
$x = 0
show6:
show6:
$x = $x + 1
$x = $x + 1
sleep
2
000
sleep
1
000
if $x ==
2
0 then
if $x ==
4
0 then
return -1
return -1
endi
endi
sql show dnodes -x show6
sql show dnodes -x show6
...
@@ -299,6 +315,15 @@ print dnode5 $dnode5Vnodes
...
@@ -299,6 +315,15 @@ print dnode5 $dnode5Vnodes
$dnode6Vnodes = $data2_6
$dnode6Vnodes = $data2_6
print dnode6 $dnode6Vnodes
print dnode6 $dnode6Vnodes
if $dnode1Vnodes != 2 then
goto show6
endi
if $dnode4Vnodes != 2 then
goto show6
endi
if $dnode5Vnodes != 3 then
goto show6
endi
if $dnode6Vnodes != 2 then
if $dnode6Vnodes != 2 then
goto show6
goto show6
endi
endi
...
@@ -315,13 +340,12 @@ print dnode7 ==> $data2_7
...
@@ -315,13 +340,12 @@ print dnode7 ==> $data2_7
print ============================== step7
print ============================== step7
print ========= drop dnode4
print ========= drop dnode4
sql drop dnode $hostname4
sql drop dnode $hostname4
sleep 9000
$x = 0
$x = 0
show7:
show7:
$x = $x + 1
$x = $x + 1
sleep
2
000
sleep
1
000
if $x ==
2
0 then
if $x ==
4
0 then
return -1
return -1
endi
endi
sql show dnodes -x show7
sql show dnodes -x show7
...
@@ -357,16 +381,19 @@ print dnode5 ==> $data2_5
...
@@ -357,16 +381,19 @@ print dnode5 ==> $data2_5
print dnode6 ==> $data2_6
print dnode6 ==> $data2_6
print dnode7 ==> $data2_7
print dnode7 ==> $data2_7
if $data2_6 != slave then
goto show7
endi
print ============================== step8
print ============================== step8
sql create dnode $hostname7
sql create dnode $hostname7
system sh/exec.sh -n dnode7 -s start
system sh/exec.sh -n dnode7 -s start
sleep 9000
$x = 0
$x = 0
show8:
show8:
$x = $x + 1
$x = $x + 1
sleep
2
000
sleep
1
000
if $x ==
2
0 then
if $x ==
4
0 then
return -1
return -1
endi
endi
sql show dnodes -x show8
sql show dnodes -x show8
...
@@ -379,6 +406,15 @@ print dnode6 $dnode6Vnodes
...
@@ -379,6 +406,15 @@ print dnode6 $dnode6Vnodes
$dnode7Vnodes = $data2_7
$dnode7Vnodes = $data2_7
print dnode7 $dnode7Vnodes
print dnode7 $dnode7Vnodes
if $dnode1Vnodes != 2 then
goto show8
endi
if $dnode5Vnodes != 2 then
goto show8
endi
if $dnode6Vnodes != 3 then
goto show8
endi
if $dnode7Vnodes != 2 then
if $dnode7Vnodes != 2 then
goto show8
goto show8
endi
endi
...
@@ -393,19 +429,17 @@ print dnode6 ==> $data2_6
...
@@ -393,19 +429,17 @@ print dnode6 ==> $data2_6
print dnode7 ==> $data2_7
print dnode7 ==> $data2_7
print ============================== step9
print ============================== step9
print ========= drop dnode1
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s stop -x SIGINT
print stop dnode1 and sleep 10000
sleep 10000
sql drop dnode $hostname1
$x = 0
print drop dnode1 and sleep 9000
show9:
sleep 9000
$x = $x + 1
sleep 1000
if $x == 40 then
return -1
endi
sql show mnodes -x show9
sql show mnodes
$dnode1Role = $data2_1
$dnode4Role = $data2_4
$dnode5Role = $data2_5
print dnode1 ==> $data2_1
print dnode1 ==> $data2_1
print dnode2 ==> $data2_2
print dnode2 ==> $data2_2
print dnode3 ==> $data2_3
print dnode3 ==> $data2_3
...
@@ -414,26 +448,27 @@ print dnode5 ==> $data2_5
...
@@ -414,26 +448,27 @@ print dnode5 ==> $data2_5
print dnode6 ==> $data2_6
print dnode6 ==> $data2_6
print dnode7 ==> $data2_7
print dnode7 ==> $data2_7
if $dnode1Role != offline then
if $data2_1 != offline then
return -1
goto show9
endi
if $data2_5 != master then
goto show9
endi
if $data2_6 != slave then
goto show9
endi
endi
print ============================== step9.1
print ============================== step10
sleep 2000
sql drop dnode $hostname1
system sh/exec.sh -n dnode1 -s start
$x = 0
$x = 0
show
9
:
show
10
:
$x = $x + 1
$x = $x + 1
sleep
2
000
sleep
1
000
if $x ==
2
0 then
if $x ==
4
0 then
return -1
return -1
endi
endi
sql show mnodes -x show10
sql show mnodes
$dnode1Role = $data2_1
$dnode4Role = $data2_4
$dnode5Role = $data2_5
print dnode1 ==> $data2_1
print dnode1 ==> $data2_1
print dnode2 ==> $data2_2
print dnode2 ==> $data2_2
print dnode3 ==> $data2_3
print dnode3 ==> $data2_3
...
@@ -442,7 +477,31 @@ print dnode5 ==> $data2_5
...
@@ -442,7 +477,31 @@ print dnode5 ==> $data2_5
print dnode6 ==> $data2_6
print dnode6 ==> $data2_6
print dnode7 ==> $data2_7
print dnode7 ==> $data2_7
sql show dnodes -x show9
if $data2_1 != null then
goto show10
endi
if $data2_5 != master then
goto show10
endi
if $data2_6 != slave then
goto show10
endi
if $data2_7 != slave then
goto show10
endi
print ============================== step11
system sh/exec.sh -n dnode1 -s start
$x = 0
show11:
$x = $x + 1
sleep 1000
if $x == 40 then
return -1
endi
sql show dnodes -x show11
$dnode5Vnodes = $data2_5
$dnode5Vnodes = $data2_5
print dnode5 $dnode5Vnodes
print dnode5 $dnode5Vnodes
$dnode6Vnodes = $data2_6
$dnode6Vnodes = $data2_6
...
@@ -451,17 +510,16 @@ $dnode7Vnodes = $data2_7
...
@@ -451,17 +510,16 @@ $dnode7Vnodes = $data2_7
print dnode7 $dnode7Vnodes
print dnode7 $dnode7Vnodes
if $dnode5Vnodes != 3 then
if $dnode5Vnodes != 3 then
goto show
9
goto show
11
endi
endi
if $dnode6Vnodes != 3 then
if $dnode6Vnodes != 3 then
goto show
9
goto show
11
endi
endi
if $dnode7Vnodes != 3 then
if $dnode7Vnodes != 3 then
goto show
9
goto show
11
endi
endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s stop -x SIGINT
sleep 5000
sql show mnodes
sql show mnodes
print dnode1 ==> $data2_1
print dnode1 ==> $data2_1
...
@@ -472,15 +530,13 @@ print dnode5 ==> $data2_5
...
@@ -472,15 +530,13 @@ print dnode5 ==> $data2_5
print dnode6 ==> $data2_6
print dnode6 ==> $data2_6
print dnode7 ==> $data2_7
print dnode7 ==> $data2_7
print ============================== step11
print ============================== step12
print ========= add db4
sql create database c_b3_d4 replica 3
sql create database c_b3_d4 replica 3
sql use c_b3_d4
sql use c_b3_d4
$x = 0
$x = 0
create4:
create4:
$x = $x + 1
$x = $x + 1
sleep
2
000
sleep
1
000
if $x == 20 then
if $x == 20 then
return -1
return -1
endi
endi
...
@@ -491,16 +547,14 @@ sql insert into c_b3_t4 values(1520000022043, 43)
...
@@ -491,16 +547,14 @@ sql insert into c_b3_t4 values(1520000022043, 43)
sql insert into c_b3_t4 values(1520000023042, 42)
sql insert into c_b3_t4 values(1520000023042, 42)
sql insert into c_b3_t4 values(1520000024041, 41)
sql insert into c_b3_t4 values(1520000024041, 41)
sleep 3000
$x = 0
$x = 0
show1
1
:
show1
2
:
$x = $x + 1
$x = $x + 1
sleep
2
000
sleep
1
000
if $x ==
2
0 then
if $x ==
4
0 then
return -1
return -1
endi
endi
sql show dnodes -x show1
1
sql show dnodes -x show1
2
$dnode5Vnodes = $data2_5
$dnode5Vnodes = $data2_5
print dnode5 $dnode5Vnodes
print dnode5 $dnode5Vnodes
$dnode6Vnodes = $data2_6
$dnode6Vnodes = $data2_6
...
@@ -509,21 +563,18 @@ $dnode7Vnodes = $data2_7
...
@@ -509,21 +563,18 @@ $dnode7Vnodes = $data2_7
print dnode7 $dnode7Vnodes
print dnode7 $dnode7Vnodes
if $dnode5Vnodes != 4 then
if $dnode5Vnodes != 4 then
goto show1
1
goto show1
2
endi
endi
if $dnode6Vnodes != 4 then
if $dnode6Vnodes != 4 then
goto show1
1
goto show1
2
endi
endi
if $dnode7Vnodes != 4 then
if $dnode7Vnodes != 4 then
goto show1
1
goto show1
2
endi
endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
sleep 5000
print ============================== step13
print ============================== step13
sql reset query cache
sql reset query cache
sleep
10
00
sleep
2
00
print ========= check data
print ========= check data
...
@@ -590,4 +641,3 @@ system sh/exec.sh -n dnode4 -s stop -x SIGINT
...
@@ -590,4 +641,3 @@ system sh/exec.sh -n dnode4 -s stop -x SIGINT
system sh/exec.sh -n dnode5 -s stop -x SIGINT
system sh/exec.sh -n dnode5 -s stop -x SIGINT
system sh/exec.sh -n dnode6 -s stop -x SIGINT
system sh/exec.sh -n dnode6 -s stop -x SIGINT
system sh/exec.sh -n dnode7 -s stop -x SIGINT
system sh/exec.sh -n dnode7 -s stop -x SIGINT
system sh/exec.sh -n dnode8 -s stop -x SIGINT
tests/script/unique/db/replica_add12.sim
浏览文件 @
b340e374
...
@@ -32,7 +32,43 @@ sql create dnode $hostname2
...
@@ -32,7 +32,43 @@ sql create dnode $hostname2
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode2 -s start
sql create dnode $hostname3
sql create dnode $hostname3
system sh/exec.sh -n dnode3 -s start
system sh/exec.sh -n dnode3 -s start
sleep 3000
$x = 0
step1:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show dnodes
print dnode1 $data4_1
print dnode2 $data4_2
print dnode3 $data4_3
if $data4_1 != ready then
goto step1
endi
if $data4_2 != ready then
goto step1
endi
if $data4_3 != ready then
goto step1
endi
sql show mnodes
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
goto step1
endi
if $data2_2 != null then
goto step1
endi
if $data2_3 != null then
goto step1
endi
print ======== step1
print ======== step1
sql create database d1 replica 1
sql create database d1 replica 1
...
@@ -70,8 +106,6 @@ if $rows != 1 then
...
@@ -70,8 +106,6 @@ if $rows != 1 then
return -1
return -1
endi
endi
sleep 2000
sql show dnodes
sql show dnodes
print dnode1 ==> openVnodes: $data2_1
print dnode1 ==> openVnodes: $data2_1
print dnode2 ==> openVnodes: $data2_2
print dnode2 ==> openVnodes: $data2_2
...
@@ -98,8 +132,8 @@ sql alter database d4 replica 2
...
@@ -98,8 +132,8 @@ sql alter database d4 replica 2
$x = 0
$x = 0
a1:
a1:
$x = $x + 1
$x = $x + 1
sleep
2
000
sleep
1
000
if $x ==
2
0 then
if $x ==
4
0 then
return -1
return -1
endi
endi
...
@@ -127,10 +161,7 @@ if $data03 != 2 then
...
@@ -127,10 +161,7 @@ if $data03 != 2 then
goto a1
goto a1
endi
endi
sleep 10000
print ======== step3
print ======== step3
sql show dnodes
sql show dnodes
print dnode1 ==> openVnodes: $data2_1
print dnode1 ==> openVnodes: $data2_1
print dnode2 ==> openVnodes: $data2_2
print dnode2 ==> openVnodes: $data2_2
...
@@ -153,7 +184,6 @@ sql insert into d1.t1 values(now, 2)
...
@@ -153,7 +184,6 @@ sql insert into d1.t1 values(now, 2)
sql insert into d2.t2 values(now, 2)
sql insert into d2.t2 values(now, 2)
sql insert into d3.t3 values(now, 2)
sql insert into d3.t3 values(now, 2)
sql insert into d4.t4 values(now, 2)
sql insert into d4.t4 values(now, 2)
sleep 1000
sql select * from d1.t1
sql select * from d1.t1
if $rows != 2 then
if $rows != 2 then
...
@@ -176,34 +206,23 @@ if $rows != 2 then
...
@@ -176,34 +206,23 @@ if $rows != 2 then
endi
endi
sql reset query cache
sql reset query cache
sleep 200
0
sleep 200
print ========= step5
print ========= step5
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
sleep 5000
sql select * from d1.t1 -x s51
s51:
sql_error select * from d1.t1
#sql insert into d1.t1 values(now, 3) -x s52
sql_error select * from d2.t2
s52:
sql_error select * from d3.t3
sql_error select * from d4.t4
print ===== insert data
sql_error insert into d1.t1 values(now, 3)
sql_error insert into d2.t2 values(now, 3)
sql_error insert into d3.t3 values(now, 3)
sql_error insert into d4.t4 values(now, 3)
sleep 1000
print ========= step6
print ========= step6
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode2 -s start
sleep 5000
$x = 0
$x = 0
step6:
step6:
$x = $x + 1
$x = $x + 1
sleep
2
000
sleep
1
000
if $x ==
1
0 then
if $x ==
2
0 then
return -1
return -1
endi
endi
...
@@ -230,12 +249,11 @@ print online vnodes $data03
...
@@ -230,12 +249,11 @@ print online vnodes $data03
if $data03 != 2 then
if $data03 != 2 then
goto step6
goto step6
endi
endi
sleep 1000
sql insert into d1.t1 values(now, 3)
sql insert into d1.t1 values(now, 3)
-x step6
sql insert into d2.t2 values(now, 3)
sql insert into d2.t2 values(now, 3)
-x step6
sql insert into d3.t3 values(now, 3)
sql insert into d3.t3 values(now, 3)
-x step6
sql insert into d4.t4 values(now, 3)
sql insert into d4.t4 values(now, 3)
-x step6
sql select * from d1.t1
sql select * from d1.t1
if $rows != 3 then
if $rows != 3 then
...
@@ -258,30 +276,21 @@ if $rows != 3 then
...
@@ -258,30 +276,21 @@ if $rows != 3 then
endi
endi
print ========= step61
print ========= step61
system sh/exec.sh -n dnode3 -s stop -x SIGINT
system sh/exec.sh -n dnode3 -s stop -x SIGINT
sleep 5000
#sql insert into d1.t1 values(now, 3) -x s61
s61:
sql_error insert into d1.t1 values(now, 3)
sql select * from d2.t2 -x s62
sql_error insert into d2.t2 values(now, 3)
s62:
sql_error insert into d3.t3 values(now, 3)
sql_error insert into d4.t4 values(now, 3)
sleep 1000
sql_error select * from d1.t1
sql_error select * from d2.t2
sql_error select * from d3.t3
sql_error select * from d4.t4
print ========= step7
print ========= step7
system sh/exec.sh -n dnode3 -s start
system sh/exec.sh -n dnode3 -s start
sleep 5000
$x = 0
$x = 0
step7:
step7:
$x = $x + 1
$x = $x + 1
sleep
2
000
sleep
1
000
if $x ==
1
0 then
if $x ==
2
0 then
return -1
return -1
endi
endi
...
@@ -308,13 +317,11 @@ print online vnodes $data03
...
@@ -308,13 +317,11 @@ print online vnodes $data03
if $data03 != 2 then
if $data03 != 2 then
goto step7
goto step7
endi
endi
sleep 1000
sql insert into d1.t1 values(now, 5)
sql insert into d1.t1 values(now, 5) -x step7
sql insert into d2.t2 values(now, 5)
sql insert into d2.t2 values(now, 5) -x step7
sql insert into d3.t3 values(now, 5)
sql insert into d3.t3 values(now, 5) -x step7
sql insert into d4.t4 values(now, 5)
sql insert into d4.t4 values(now, 5) -x step7
sleep 1000
sql select * from d1.t1
sql select * from d1.t1
if $rows != 4 then
if $rows != 4 then
...
@@ -339,8 +346,4 @@ endi
...
@@ -339,8 +346,4 @@ endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/exec.sh -n dnode3 -s stop -x SIGINT
system sh/exec.sh -n dnode3 -s stop -x SIGINT
system sh/exec.sh -n dnode4 -s stop -x SIGINT
system sh/exec.sh -n dnode4 -s stop -x SIGINT
system sh/exec.sh -n dnode5 -s stop -x SIGINT
\ No newline at end of file
system sh/exec.sh -n dnode6 -s stop -x SIGINT
system sh/exec.sh -n dnode7 -s stop -x SIGINT
system sh/exec.sh -n dnode8 -s stop -x SIGINT
\ No newline at end of file
tests/script/unique/db/replica_add13.sim
浏览文件 @
b340e374
...
@@ -34,7 +34,41 @@ sql create dnode $hostname3
...
@@ -34,7 +34,41 @@ sql create dnode $hostname3
system sh/exec.sh -n dnode3 -s start
system sh/exec.sh -n dnode3 -s start
sql create dnode $hostname4
sql create dnode $hostname4
system sh/exec.sh -n dnode4 -s start
system sh/exec.sh -n dnode4 -s start
sleep 3000
$x = 0
step1:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show dnodes
print dnode1 $data4_1
print dnode2 $data4_2
print dnode3 $data4_3
print dnode4 $data4_4
if $data4_1 != ready then
goto step1
endi
if $data4_2 != ready then
goto step1
endi
if $data4_3 != ready then
goto step1
endi
if $data4_4 != ready then
goto step1
endi
sql show mnodes
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
goto step1
endi
print ======== step1
print ======== step1
sql create database d1 replica 1
sql create database d1 replica 1
...
@@ -51,7 +85,6 @@ sql insert into d1.t1 values(1589529000011, 1)
...
@@ -51,7 +85,6 @@ sql insert into d1.t1 values(1589529000011, 1)
sql insert into d2.t2 values(1589529000021, 1)
sql insert into d2.t2 values(1589529000021, 1)
sql insert into d3.t3 values(1589529000031, 1)
sql insert into d3.t3 values(1589529000031, 1)
sql insert into d4.t4 values(1589529000041, 1)
sql insert into d4.t4 values(1589529000041, 1)
sleep 1000
sql select * from d1.t1
sql select * from d1.t1
if $rows != 1 then
if $rows != 1 then
...
@@ -82,8 +115,8 @@ sql alter database d4 replica 3
...
@@ -82,8 +115,8 @@ sql alter database d4 replica 3
$x = 0
$x = 0
a1:
a1:
$x = $x + 1
$x = $x + 1
sleep
2
000
sleep
1
000
if $x ==
2
0 then
if $x ==
4
0 then
return -1
return -1
endi
endi
...
@@ -111,17 +144,7 @@ if $data03 != 3 then
...
@@ -111,17 +144,7 @@ if $data03 != 3 then
goto a1
goto a1
endi
endi
sleep 5000
print ======== step3
print ======== step3
$x = 0
show3:
$x = $x + 1
sleep 2000
if $x == 20 then
return -1
endi
sql show dnodes
sql show dnodes
print dnode1 ==> openVnodes: $data2_1
print dnode1 ==> openVnodes: $data2_1
print dnode2 ==> openVnodes: $data2_2
print dnode2 ==> openVnodes: $data2_2
...
@@ -149,7 +172,6 @@ sql insert into d1.t1 values(1589529000012, 2)
...
@@ -149,7 +172,6 @@ sql insert into d1.t1 values(1589529000012, 2)
sql insert into d2.t2 values(1589529000022, 2)
sql insert into d2.t2 values(1589529000022, 2)
sql insert into d3.t3 values(1589529000032, 2)
sql insert into d3.t3 values(1589529000032, 2)
sql insert into d4.t4 values(1589529000042, 2)
sql insert into d4.t4 values(1589529000042, 2)
sleep 1000
sql select * from d1.t1
sql select * from d1.t1
if $rows != 2 then
if $rows != 2 then
...
@@ -173,15 +195,13 @@ endi
...
@@ -173,15 +195,13 @@ endi
print ========= step5
print ========= step5
sql reset query cache
sql reset query cache
sleep 100
0
sleep 100
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
sleep 5000
sql insert into d1.t1 values(1589529000013, 3)
sql insert into d1.t1 values(1589529000013, 3)
sql insert into d2.t2 values(1589529000023, 3)
sql insert into d2.t2 values(1589529000023, 3)
sql insert into d3.t3 values(1589529000033, 3)
sql insert into d3.t3 values(1589529000033, 3)
sql insert into d4.t4 values(1589529000043, 3)
sql insert into d4.t4 values(1589529000043, 3)
sleep 1000
sql select * from d1.t1
sql select * from d1.t1
if $rows != 3 then
if $rows != 3 then
...
@@ -205,13 +225,12 @@ endi
...
@@ -205,13 +225,12 @@ endi
print ========= step6
print ========= step6
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode2 -s start
sleep 5000
$x = 0
$x = 0
step6:
step6:
$x = $x + 1
$x = $x + 1
sleep
2
000
sleep
1
000
if $x ==
2
0 then
if $x ==
4
0 then
return -1
return -1
endi
endi
...
@@ -238,16 +257,13 @@ print online vnodes $data03
...
@@ -238,16 +257,13 @@ print online vnodes $data03
if $data03 != 3 then
if $data03 != 3 then
goto step6
goto step6
endi
endi
sleep 1000
system sh/exec.sh -n dnode3 -s stop -x SIGINT
system sh/exec.sh -n dnode3 -s stop -x SIGINT
sleep 5000
sql insert into d1.t1 values(1589529000014, 4)
sql insert into d1.t1 values(1589529000014, 4)
sql insert into d2.t2 values(1589529000024, 4)
sql insert into d2.t2 values(1589529000024, 4)
sql insert into d3.t3 values(1589529000034, 4)
sql insert into d3.t3 values(1589529000034, 4)
sql insert into d4.t4 values(1589529000044, 4)
sql insert into d4.t4 values(1589529000044, 4)
sleep 1000
sql select * from d1.t1
sql select * from d1.t1
print select * from d1.t1 $rows
print select * from d1.t1 $rows
...
@@ -275,12 +291,11 @@ endi
...
@@ -275,12 +291,11 @@ endi
print ========= step7
print ========= step7
system sh/exec.sh -n dnode3 -s start
system sh/exec.sh -n dnode3 -s start
sleep 5000
$x = 0
$x = 0
step7:
step7:
$x = $x + 1
$x = $x + 1
sleep
2
000
sleep
1
000
if $x == 20 then
if $x == 20 then
return -1
return -1
endi
endi
...
@@ -308,16 +323,13 @@ print online vnodes $data03
...
@@ -308,16 +323,13 @@ print online vnodes $data03
if $data03 != 3 then
if $data03 != 3 then
goto step7
goto step7
endi
endi
sleep 1000
system sh/exec.sh -n dnode4 -s stop -x SIGINT
system sh/exec.sh -n dnode4 -s stop -x SIGINT
sleep 5000
sql insert into d1.t1 values(1589529000015, 5)
sql insert into d1.t1 values(1589529000015, 5)
sql insert into d2.t2 values(1589529000025, 5)
sql insert into d2.t2 values(1589529000025, 5)
sql insert into d3.t3 values(1589529000035, 5)
sql insert into d3.t3 values(1589529000035, 5)
sql insert into d4.t4 values(1589529000045, 5)
sql insert into d4.t4 values(1589529000045, 5)
sleep 1000
sql select * from d1.t1
sql select * from d1.t1
if $rows != 5 then
if $rows != 5 then
...
@@ -341,13 +353,12 @@ endi
...
@@ -341,13 +353,12 @@ endi
print ========= step8
print ========= step8
system sh/exec.sh -n dnode4 -s start
system sh/exec.sh -n dnode4 -s start
sleep 5000
$x = 0
$x = 0
step8:
step8:
$x = $x + 1
$x = $x + 1
sleep
2
000
sleep
1
000
if $x ==
2
0 then
if $x ==
4
0 then
return -1
return -1
endi
endi
...
@@ -374,16 +385,13 @@ print online vnodes $data03
...
@@ -374,16 +385,13 @@ print online vnodes $data03
if $data03 != 3 then
if $data03 != 3 then
goto step8
goto step8
endi
endi
sleep 1000
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
sleep 5000
sql insert into d1.t1 values(1589529000016, 6)
sql insert into d1.t1 values(1589529000016, 6)
sql insert into d2.t2 values(1589529000026, 6)
sql insert into d2.t2 values(1589529000026, 6)
sql insert into d3.t3 values(1589529000036, 6)
sql insert into d3.t3 values(1589529000036, 6)
sql insert into d4.t4 values(1589529000046, 6)
sql insert into d4.t4 values(1589529000046, 6)
sleep 1000
sql select * from d1.t1
sql select * from d1.t1
if $rows != 6 then
if $rows != 6 then
...
@@ -408,8 +416,4 @@ endi
...
@@ -408,8 +416,4 @@ endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/exec.sh -n dnode3 -s stop -x SIGINT
system sh/exec.sh -n dnode3 -s stop -x SIGINT
system sh/exec.sh -n dnode4 -s stop -x SIGINT
system sh/exec.sh -n dnode4 -s stop -x SIGINT
system sh/exec.sh -n dnode5 -s stop -x SIGINT
\ No newline at end of file
system sh/exec.sh -n dnode6 -s stop -x SIGINT
system sh/exec.sh -n dnode7 -s stop -x SIGINT
system sh/exec.sh -n dnode8 -s stop -x SIGINT
\ No newline at end of file
tests/script/unique/db/replica_add23.sim
浏览文件 @
b340e374
...
@@ -34,7 +34,42 @@ sql create dnode $hostname3
...
@@ -34,7 +34,42 @@ sql create dnode $hostname3
system sh/exec.sh -n dnode3 -s start
system sh/exec.sh -n dnode3 -s start
sql create dnode $hostname4
sql create dnode $hostname4
system sh/exec.sh -n dnode4 -s start
system sh/exec.sh -n dnode4 -s start
sleep 3000
$x = 0
step1:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show dnodes
print dnode1 $data4_1
print dnode2 $data4_2
print dnode3 $data4_3
print dnode4 $data4_4
if $data4_1 != ready then
goto step1
endi
if $data4_2 != ready then
goto step1
endi
if $data4_3 != ready then
goto step1
endi
if $data4_4 != ready then
goto step1
endi
sql show mnodes
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
goto step1
endi
print ======== step1
print ======== step1
sql create database d1 replica 2
sql create database d1 replica 2
...
@@ -51,7 +86,6 @@ sql insert into d1.t1 values(1588262400001, 1)
...
@@ -51,7 +86,6 @@ sql insert into d1.t1 values(1588262400001, 1)
sql insert into d2.t2 values(1588262400001, 1)
sql insert into d2.t2 values(1588262400001, 1)
sql insert into d3.t3 values(1588262400001, 1)
sql insert into d3.t3 values(1588262400001, 1)
sql insert into d4.t4 values(1588262400001, 1)
sql insert into d4.t4 values(1588262400001, 1)
sleep 1000
sql select * from d1.t1
sql select * from d1.t1
if $rows != 1 then
if $rows != 1 then
...
@@ -82,8 +116,8 @@ sql alter database d4 replica 3
...
@@ -82,8 +116,8 @@ sql alter database d4 replica 3
$x = 0
$x = 0
a1:
a1:
$x = $x + 1
$x = $x + 1
sleep
2
000
sleep
1
000
if $x ==
2
0 then
if $x ==
4
0 then
return -1
return -1
endi
endi
...
@@ -111,17 +145,7 @@ if $data03 != 3 then
...
@@ -111,17 +145,7 @@ if $data03 != 3 then
goto a1
goto a1
endi
endi
sleep 10000
print ======== step3
print ======== step3
$x = 0
show3:
$x = $x + 1
sleep 2000
if $x == 10 then
return -1
endi
sql show dnodes
sql show dnodes
print dnode1 ==> openVnodes: $data2_1
print dnode1 ==> openVnodes: $data2_1
print dnode2 ==> openVnodes: $data2_2
print dnode2 ==> openVnodes: $data2_2
...
@@ -149,7 +173,6 @@ sql insert into d1.t1 values(1588262400002, 2)
...
@@ -149,7 +173,6 @@ sql insert into d1.t1 values(1588262400002, 2)
sql insert into d2.t2 values(1588262400002, 2)
sql insert into d2.t2 values(1588262400002, 2)
sql insert into d3.t3 values(1588262400002, 2)
sql insert into d3.t3 values(1588262400002, 2)
sql insert into d4.t4 values(1588262400002, 2)
sql insert into d4.t4 values(1588262400002, 2)
sleep 1000
sql select * from d1.t1
sql select * from d1.t1
if $rows != 2 then
if $rows != 2 then
...
@@ -172,17 +195,14 @@ if $rows != 2 then
...
@@ -172,17 +195,14 @@ if $rows != 2 then
endi
endi
sql reset query cache
sql reset query cache
sleep 100
0
sleep 100
print ========= step5
print ========= step5
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
sleep 5000
sql insert into d1.t1 values(1588262400003, 3)
sql insert into d1.t1 values(1588262400003, 3)
sql insert into d2.t2 values(1588262400003, 3)
sql insert into d2.t2 values(1588262400003, 3)
sql insert into d3.t3 values(1588262400003, 3)
sql insert into d3.t3 values(1588262400003, 3)
sql insert into d4.t4 values(1588262400003, 3)
sql insert into d4.t4 values(1588262400003, 3)
sleep 1000
sql select * from d1.t1
sql select * from d1.t1
if $rows != 3 then
if $rows != 3 then
...
@@ -206,13 +226,12 @@ endi
...
@@ -206,13 +226,12 @@ endi
print ========= step6
print ========= step6
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode2 -s start
sleep 5000
$x = 0
$x = 0
step6:
step6:
$x = $x + 1
$x = $x + 1
sleep
2
000
sleep
1
000
if $x ==
1
0 then
if $x ==
2
0 then
return -1
return -1
endi
endi
...
@@ -239,16 +258,13 @@ print online vnodes $data03
...
@@ -239,16 +258,13 @@ print online vnodes $data03
if $data03 != 3 then
if $data03 != 3 then
goto step6
goto step6
endi
endi
sleep 1000
system sh/exec.sh -n dnode3 -s stop -x SIGINT
system sh/exec.sh -n dnode3 -s stop -x SIGINT
sleep 5000
sql insert into d1.t1 values(1588262400004, 4)
sql insert into d1.t1 values(1588262400004, 4)
sql insert into d2.t2 values(1588262400004, 4)
sql insert into d2.t2 values(1588262400004, 4)
sql insert into d3.t3 values(1588262400004, 4)
sql insert into d3.t3 values(1588262400004, 4)
sql insert into d4.t4 values(1588262400004, 4)
sql insert into d4.t4 values(1588262400004, 4)
sleep 1000
sql select * from d1.t1
sql select * from d1.t1
if $rows != 4 then
if $rows != 4 then
...
@@ -272,13 +288,12 @@ endi
...
@@ -272,13 +288,12 @@ endi
print ========= step7
print ========= step7
system sh/exec.sh -n dnode3 -s start
system sh/exec.sh -n dnode3 -s start
sleep 5000
$x = 0
$x = 0
step7:
step7:
$x = $x + 1
$x = $x + 1
sleep
2
000
sleep
1
000
if $x ==
1
0 then
if $x ==
2
0 then
return -1
return -1
endi
endi
...
@@ -305,16 +320,13 @@ print online vnodes $data03
...
@@ -305,16 +320,13 @@ print online vnodes $data03
if $data03 != 3 then
if $data03 != 3 then
goto step7
goto step7
endi
endi
sleep 1000
system sh/exec.sh -n dnode4 -s stop -x SIGINT
system sh/exec.sh -n dnode4 -s stop -x SIGINT
sleep 5000
sql insert into d1.t1 values(1588262400005, 5)
sql insert into d1.t1 values(1588262400005, 5)
sql insert into d2.t2 values(1588262400005, 5)
sql insert into d2.t2 values(1588262400005, 5)
sql insert into d3.t3 values(1588262400005, 5)
sql insert into d3.t3 values(1588262400005, 5)
sql insert into d4.t4 values(1588262400005, 5)
sql insert into d4.t4 values(1588262400005, 5)
sleep 1000
sql select * from d1.t1
sql select * from d1.t1
if $rows != 5 then
if $rows != 5 then
...
@@ -338,7 +350,6 @@ endi
...
@@ -338,7 +350,6 @@ endi
print ========= step8
print ========= step8
system sh/exec.sh -n dnode4 -s start
system sh/exec.sh -n dnode4 -s start
sleep 5000
$x = 0
$x = 0
step8:
step8:
...
@@ -371,16 +382,13 @@ print online vnodes $data03
...
@@ -371,16 +382,13 @@ print online vnodes $data03
if $data03 != 3 then
if $data03 != 3 then
goto step8
goto step8
endi
endi
sleep 1000
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
sleep 5000
sql insert into d1.t1 values(1588262400006, 6)
sql insert into d1.t1 values(1588262400006, 6)
sql insert into d2.t2 values(1588262400006, 6)
sql insert into d2.t2 values(1588262400006, 6)
sql insert into d3.t3 values(1588262400006, 6)
sql insert into d3.t3 values(1588262400006, 6)
sql insert into d4.t4 values(1588262400006, 6)
sql insert into d4.t4 values(1588262400006, 6)
sleep 1000
sql select * from d1.t1
sql select * from d1.t1
if $rows != 6 then
if $rows != 6 then
...
@@ -405,8 +413,4 @@ endi
...
@@ -405,8 +413,4 @@ endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/exec.sh -n dnode3 -s stop -x SIGINT
system sh/exec.sh -n dnode3 -s stop -x SIGINT
system sh/exec.sh -n dnode4 -s stop -x SIGINT
system sh/exec.sh -n dnode4 -s stop -x SIGINT
system sh/exec.sh -n dnode5 -s stop -x SIGINT
\ No newline at end of file
system sh/exec.sh -n dnode6 -s stop -x SIGINT
system sh/exec.sh -n dnode7 -s stop -x SIGINT
system sh/exec.sh -n dnode8 -s stop -x SIGINT
\ No newline at end of file
tests/script/unique/db/replica_part.sim
浏览文件 @
b340e374
...
@@ -25,7 +25,38 @@ sql create dnode $hostname2
...
@@ -25,7 +25,38 @@ sql create dnode $hostname2
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode2 -s start
sql create dnode $hostname3
sql create dnode $hostname3
system sh/exec.sh -n dnode3 -s start
system sh/exec.sh -n dnode3 -s start
sleep 3000
$x = 0
step1:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show dnodes
print dnode1 $data4_1
print dnode2 $data4_2
print dnode3 $data4_3
print dnode4 $data4_4
if $data4_1 != ready then
goto step1
endi
if $data4_2 != ready then
goto step1
endi
if $data4_3 != ready then
goto step1
endi
sql show mnodes
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
goto step1
endi
print ======== step1
print ======== step1
sql create database d1 replica 3
sql create database d1 replica 3
...
@@ -42,7 +73,6 @@ sql insert into d2.t2 values(now, 1)
...
@@ -42,7 +73,6 @@ sql insert into d2.t2 values(now, 1)
sql insert into d1.t1 values(now, 1)
sql insert into d1.t1 values(now, 1)
sql insert into d3.t3 values(now, 1)
sql insert into d3.t3 values(now, 1)
sql insert into d4.t4 values(now, 1)
sql insert into d4.t4 values(now, 1)
sleep 1000
sql select * from d1.t1
sql select * from d1.t1
if $rows != 1 then
if $rows != 1 then
...
@@ -73,8 +103,8 @@ sql alter database d4 replica 2
...
@@ -73,8 +103,8 @@ sql alter database d4 replica 2
$x = 0
$x = 0
a1:
a1:
$x = $x + 1
$x = $x + 1
sleep
2
000
sleep
1
000
if $x ==
2
0 then
if $x ==
4
0 then
return -1
return -1
endi
endi
...
@@ -102,19 +132,16 @@ if $data03 != 2 then
...
@@ -102,19 +132,16 @@ if $data03 != 2 then
goto a1
goto a1
endi
endi
sleep 3000
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
sleep 5000
print ========= step3
print ========= step3
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode2 -s start
sleep 5000
$x = 0
$x = 0
step3:
step3:
$x = $x + 1
$x = $x + 1
sleep
2
000
sleep
1
000
if $x ==
1
0 then
if $x ==
2
0 then
return -1
return -1
endi
endi
...
@@ -141,14 +168,12 @@ print online vnodes $data03
...
@@ -141,14 +168,12 @@ print online vnodes $data03
if $data03 != 2 then
if $data03 != 2 then
goto step3
goto step3
endi
endi
sleep 1000
print ========= step4
print ========= step4
sql insert into d1.t1 values(now, 2)
sql insert into d1.t1 values(now, 2)
sql insert into d2.t2 values(now, 2)
sql insert into d2.t2 values(now, 2)
sql insert into d3.t3 values(now, 2)
sql insert into d3.t3 values(now, 2)
sql insert into d4.t4 values(now, 2)
sql insert into d4.t4 values(now, 2)
sleep 1000
sql select * from d1.t1
sql select * from d1.t1
if $rows != 2 then
if $rows != 2 then
...
@@ -172,10 +197,9 @@ endi
...
@@ -172,10 +197,9 @@ endi
print ========= step5
print ========= step5
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
sleep 5000
sql reset query cache
sql reset query cache
sleep 100
0
sleep 100
sql insert into d1.t1 values(now, 3) -x s1
sql insert into d1.t1 values(now, 3) -x s1
s1:
s1:
...
@@ -188,13 +212,12 @@ s1:
...
@@ -188,13 +212,12 @@ s1:
print ========= step6
print ========= step6
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode2 -s start
sleep 5000
$x = 0
$x = 0
step6:
step6:
$x = $x + 1
$x = $x + 1
sleep
2
000
sleep
1
000
if $x ==
1
0 then
if $x ==
2
0 then
return -1
return -1
endi
endi
...
@@ -221,10 +244,8 @@ print online vnodes $data03
...
@@ -221,10 +244,8 @@ print online vnodes $data03
if $data03 != 2 then
if $data03 != 2 then
goto step6
goto step6
endi
endi
sleep 1000
system sh/exec.sh -n dnode3 -s stop -x SIGINT
system sh/exec.sh -n dnode3 -s stop -x SIGINT
sleep 5000
#sql insert into d1.t1 values(now, 4) -x s5
#sql insert into d1.t1 values(now, 4) -x s5
#s5:
#s5:
...
@@ -237,13 +258,12 @@ s6:
...
@@ -237,13 +258,12 @@ s6:
print ========= step7
print ========= step7
system sh/exec.sh -n dnode3 -s start
system sh/exec.sh -n dnode3 -s start
sleep 5000
$x = 0
$x = 0
step7:
step7:
$x = $x + 1
$x = $x + 1
sleep
2
000
sleep
1
000
if $x ==
1
0 then
if $x ==
2
0 then
return -1
return -1
endi
endi
...
@@ -270,13 +290,11 @@ print online vnodes $data03
...
@@ -270,13 +290,11 @@ print online vnodes $data03
if $data03 != 2 then
if $data03 != 2 then
goto step7
goto step7
endi
endi
sleep 1000
sql insert into d1.t1 values(now, 5)
sql insert into d1.t1 values(now, 5)
sql insert into d2.t2 values(now, 5)
sql insert into d2.t2 values(now, 5)
sql insert into d3.t3 values(now, 5)
sql insert into d3.t3 values(now, 5)
sql insert into d4.t4 values(now, 5)
sql insert into d4.t4 values(now, 5)
sleep 1000
sql select * from d1.t1
sql select * from d1.t1
sql select * from d2.t2
sql select * from d2.t2
...
@@ -285,9 +303,4 @@ sql select * from d4.t4
...
@@ -285,9 +303,4 @@ sql select * from d4.t4
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/exec.sh -n dnode3 -s stop -x SIGINT
system sh/exec.sh -n dnode3 -s stop -x SIGINT
system sh/exec.sh -n dnode4 -s stop -x SIGINT
\ No newline at end of file
system sh/exec.sh -n dnode5 -s stop -x SIGINT
system sh/exec.sh -n dnode6 -s stop -x SIGINT
system sh/exec.sh -n dnode7 -s stop -x SIGINT
system sh/exec.sh -n dnode8 -s stop -x SIGINT
\ No newline at end of file
tests/script/unique/db/replica_reduce21.sim
浏览文件 @
b340e374
...
@@ -24,7 +24,32 @@ system sh/exec.sh -n dnode1 -s start
...
@@ -24,7 +24,32 @@ system sh/exec.sh -n dnode1 -s start
sql connect
sql connect
sql create dnode $hostname2
sql create dnode $hostname2
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode2 -s start
sleep 3000
$x = 0
step1:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show dnodes
print dnode1 $data4_1
print dnode2 $data4_2
if $data4_1 != ready then
goto step1
endi
if $data4_2 != ready then
goto step1
endi
sql show mnodes
print mnode1 $data2_1
print mnode1 $data2_2
if $data2_1 != master then
goto step1
endi
print ======== step1
print ======== step1
sql create database d1 replica 2
sql create database d1 replica 2
...
@@ -68,13 +93,12 @@ sql create database d5 replica 1
...
@@ -68,13 +93,12 @@ sql create database d5 replica 1
print ========= step3 alter d1
print ========= step3 alter d1
sql alter database d1 replica 1
sql alter database d1 replica 1
sleep 5000
$x = 0
$x = 0
a1:
a1:
$x = $x + 1
$x = $x + 1
sleep
2
000
sleep
1
000
if $x ==
1
0 then
if $x ==
2
0 then
return -1
return -1
endi
endi
...
@@ -88,7 +112,6 @@ endi
...
@@ -88,7 +112,6 @@ endi
print ========= step4 query d1
print ========= step4 query d1
sql insert into d1.t1 values(now, 2)
sql insert into d1.t1 values(now, 2)
sql select * from d1.t1
sql select * from d1.t1
sleep 1000
if $rows != 2 then
if $rows != 2 then
return -1
return -1
endi
endi
...
@@ -97,22 +120,20 @@ print ========= step5 query d5
...
@@ -97,22 +120,20 @@ print ========= step5 query d5
sql create table d5.t5 (ts timestamp, i int)
sql create table d5.t5 (ts timestamp, i int)
sql insert into d5.t5 values(now, 1);
sql insert into d5.t5 values(now, 1);
sql select * from d5.t5
sql select * from d5.t5
sleep 1000
if $rows != 1 then
if $rows != 1 then
return -1
return -1
endi
endi
return
return
print ========= step7 drop d1
print ========= step7 drop d1
sql drop database d1
sql drop database d1
sleep 5000
sql reset query cache
sql reset query cache
sleep 100
print ========= step8
print ========= step8
sql insert into d5.t5 values(now, 2)
sql insert into d5.t5 values(now, 2)
sql insert into d2.t2 values(now, 2)
sql insert into d2.t2 values(now, 2)
sql insert into d3.t3 values(now, 2)
sql insert into d3.t3 values(now, 2)
sql insert into d4.t4 values(now, 2)
sql insert into d4.t4 values(now, 2)
sleep 1000
sql select * from d5.t5
sql select * from d5.t5
if $rows != 2 then
if $rows != 2 then
...
@@ -136,13 +157,11 @@ endi
...
@@ -136,13 +157,11 @@ endi
print ======== step9 stop dnode2
print ======== step9 stop dnode2
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
sleep 5000
sql insert into d5.t5 values(now, 3)
sql insert into d5.t5 values(now, 3)
sql insert into d2.t2 values(now, 3)
sql insert into d2.t2 values(now, 3)
sql insert into d3.t3 values(now, 3)
sql insert into d3.t3 values(now, 3)
sql insert into d4.t4 values(now, 3)
sql insert into d4.t4 values(now, 3)
sleep 1000
sql select * from d5.t5
sql select * from d5.t5
if $rows != 3 then
if $rows != 3 then
...
@@ -165,10 +184,4 @@ if $rows != 3 then
...
@@ -165,10 +184,4 @@ if $rows != 3 then
endi
endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/exec.sh -n dnode3 -s stop -x SIGINT
\ No newline at end of file
system sh/exec.sh -n dnode4 -s stop -x SIGINT
system sh/exec.sh -n dnode5 -s stop -x SIGINT
system sh/exec.sh -n dnode6 -s stop -x SIGINT
system sh/exec.sh -n dnode7 -s stop -x SIGINT
system sh/exec.sh -n dnode8 -s stop -x SIGINT
\ No newline at end of file
tests/script/unique/db/replica_reduce31.sim
浏览文件 @
b340e374
...
@@ -26,7 +26,38 @@ sql create dnode $hostname2
...
@@ -26,7 +26,38 @@ sql create dnode $hostname2
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode2 -s start
sql create dnode $hostname3
sql create dnode $hostname3
system sh/exec.sh -n dnode3 -s start
system sh/exec.sh -n dnode3 -s start
sleep 3000
$x = 0
step1:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show dnodes
print dnode1 $data4_1
print dnode2 $data4_2
print dnode3 $data4_3
print dnode4 $data4_4
if $data4_1 != ready then
goto step1
endi
if $data4_2 != ready then
goto step1
endi
if $data4_3 != ready then
goto step1
endi
sql show mnodes
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
goto step1
endi
print ======== step1
print ======== step1
sql create database d1 replica 3
sql create database d1 replica 3
...
@@ -43,7 +74,6 @@ sql insert into d1.t1 values(now, 1)
...
@@ -43,7 +74,6 @@ sql insert into d1.t1 values(now, 1)
sql insert into d2.t2 values(now, 1)
sql insert into d2.t2 values(now, 1)
sql insert into d3.t3 values(now, 1)
sql insert into d3.t3 values(now, 1)
sql insert into d4.t4 values(now, 1)
sql insert into d4.t4 values(now, 1)
sleep 1000
sql select * from d1.t1
sql select * from d1.t1
if $rows != 1 then
if $rows != 1 then
...
@@ -76,8 +106,8 @@ sql alter database d3 replica 2
...
@@ -76,8 +106,8 @@ sql alter database d3 replica 2
$x = 0
$x = 0
a2:
a2:
$x = $x + 1
$x = $x + 1
sleep
2
000
sleep
1
000
if $x ==
2
0 then
if $x ==
4
0 then
return -1
return -1
endi
endi
...
@@ -99,18 +129,15 @@ if $data03 != 2 then
...
@@ -99,18 +129,15 @@ if $data03 != 2 then
goto a2
goto a2
endi
endi
sleep 3000
sql alter database d1 replica 1
sql alter database d1 replica 1
sql alter database d2 replica 1
sql alter database d2 replica 1
sql alter database d3 replica 1
sql alter database d3 replica 1
sleep 5000
$x = 0
$x = 0
a1:
a1:
$x = $x + 1
$x = $x + 1
sleep
2
000
sleep
1
000
if $x ==
1
0 then
if $x ==
2
0 then
return -1
return -1
endi
endi
...
@@ -134,13 +161,12 @@ endi
...
@@ -134,13 +161,12 @@ endi
print ========= step3
print ========= step3
sql reset query cache
sql reset query cache
sleep 100
0
sleep 100
sql insert into d1.t1 values(now, 2)
sql insert into d1.t1 values(now, 2)
sql insert into d2.t2 values(now, 2)
sql insert into d2.t2 values(now, 2)
sql insert into d3.t3 values(now, 2)
sql insert into d3.t3 values(now, 2)
sql insert into d4.t4 values(now, 2)
sql insert into d4.t4 values(now, 2)
sleep 1000
sql select * from d1.t1
sql select * from d1.t1
if $rows != 2 then
if $rows != 2 then
...
@@ -166,13 +192,37 @@ print ========= step4 alter db
...
@@ -166,13 +192,37 @@ print ========= step4 alter db
sql alter database d1 replica 2
sql alter database d1 replica 2
sql alter database d2 replica 2
sql alter database d2 replica 2
sql alter database d3 replica 2
sql alter database d3 replica 2
sleep 8000
$x = 0
step4:
$x = $x + 1
sleep 1000
if $x == 40 then
return -1
endi
sql show d1.vgroups
print online vnodes $data03
if $data03 != 2 then
goto step4
endi
sql show d2.vgroups
print online vnodes $data03
if $data03 != 2 then
goto step4
endi
sql show d3.vgroups
print online vnodes $data03
if $data03 != 2 then
goto step4
endi
sql insert into d1.t1 values(now, 3)
sql insert into d1.t1 values(now, 3)
sql insert into d2.t2 values(now, 3)
sql insert into d2.t2 values(now, 3)
sql insert into d3.t3 values(now, 3)
sql insert into d3.t3 values(now, 3)
sql insert into d4.t4 values(now, 3)
sql insert into d4.t4 values(now, 3)
sleep 1000
sql select * from d1.t1
sql select * from d1.t1
if $rows != 3 then
if $rows != 3 then
...
@@ -196,10 +246,8 @@ endi
...
@@ -196,10 +246,8 @@ endi
print ========= step4
print ========= step4
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
sleep 5000
sql reset query cache
sql reset query cache
sleep 100
0
sleep 100
sql insert into d1.t1 values(now, 4) -x step1
sql insert into d1.t1 values(now, 4) -x step1
step1:
step1:
...
@@ -212,9 +260,7 @@ step4:
...
@@ -212,9 +260,7 @@ step4:
print ========= step5
print ========= step5
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode2 -s start
sleep 5000
system sh/exec.sh -n dnode3 -s stop -x SIGINT
system sh/exec.sh -n dnode3 -s stop -x SIGINT
sleep 5000
sql insert into d1.t1 values(now, 5) -x step5
sql insert into d1.t1 values(now, 5) -x step5
step5:
step5:
...
@@ -227,13 +273,11 @@ step8:
...
@@ -227,13 +273,11 @@ step8:
print ========= step6
print ========= step6
system sh/exec.sh -n dnode3 -s start
system sh/exec.sh -n dnode3 -s start
sleep 5000
sql insert into d1.t1 values(now, 6)
sql insert into d1.t1 values(now, 6)
sql insert into d2.t2 values(now, 6)
sql insert into d2.t2 values(now, 6)
sql insert into d3.t3 values(now, 6)
sql insert into d3.t3 values(now, 6)
sql insert into d4.t4 values(now, 6)
sql insert into d4.t4 values(now, 6)
sleep 1000
sql select * from d1.t1
sql select * from d1.t1
sql select * from d2.t2
sql select * from d2.t2
...
@@ -242,9 +286,4 @@ sql select * from d4.t4
...
@@ -242,9 +286,4 @@ sql select * from d4.t4
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/exec.sh -n dnode3 -s stop -x SIGINT
system sh/exec.sh -n dnode3 -s stop -x SIGINT
system sh/exec.sh -n dnode4 -s stop -x SIGINT
\ No newline at end of file
system sh/exec.sh -n dnode5 -s stop -x SIGINT
system sh/exec.sh -n dnode6 -s stop -x SIGINT
system sh/exec.sh -n dnode7 -s stop -x SIGINT
system sh/exec.sh -n dnode8 -s stop -x SIGINT
\ No newline at end of file
tests/script/unique/db/replica_reduce32.sim
浏览文件 @
b340e374
...
@@ -26,7 +26,43 @@ sql create dnode $hostname2
...
@@ -26,7 +26,43 @@ sql create dnode $hostname2
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode2 -s start
sql create dnode $hostname3
sql create dnode $hostname3
system sh/exec.sh -n dnode3 -s start
system sh/exec.sh -n dnode3 -s start
sleep 3000
$x = 0
step1:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show dnodes
print dnode1 $data4_1
print dnode2 $data4_2
print dnode3 $data4_3
if $data4_1 != ready then
goto step1
endi
if $data4_2 != ready then
goto step1
endi
if $data4_3 != ready then
goto step1
endi
sql show mnodes
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
goto step1
endi
if $data2_2 != null then
goto step1
endi
if $data2_3 != null then
goto step1
endi
print ======== step1
print ======== step1
sql create database d1 replica 3
sql create database d1 replica 3
...
@@ -43,7 +79,6 @@ sql insert into d2.t2 values(now, 1)
...
@@ -43,7 +79,6 @@ sql insert into d2.t2 values(now, 1)
sql insert into d1.t1 values(now, 1)
sql insert into d1.t1 values(now, 1)
sql insert into d3.t3 values(now, 1)
sql insert into d3.t3 values(now, 1)
sql insert into d4.t4 values(now, 1)
sql insert into d4.t4 values(now, 1)
sleep 1000
sql select * from d1.t1
sql select * from d1.t1
if $rows != 1 then
if $rows != 1 then
...
@@ -74,8 +109,8 @@ sql alter database d4 replica 2
...
@@ -74,8 +109,8 @@ sql alter database d4 replica 2
$x = 0
$x = 0
a1:
a1:
$x = $x + 1
$x = $x + 1
sleep
2
000
sleep
1
000
if $x ==
2
0 then
if $x ==
4
0 then
return -1
return -1
endi
endi
...
@@ -103,14 +138,11 @@ if $data03 != 2 then
...
@@ -103,14 +138,11 @@ if $data03 != 2 then
goto a1
goto a1
endi
endi
sleep 12000
print ========= step3
print ========= step3
sql insert into d1.t1 values(now, 2)
sql insert into d1.t1 values(now, 2)
sql insert into d2.t2 values(now, 2)
sql insert into d2.t2 values(now, 2)
sql insert into d3.t3 values(now, 2)
sql insert into d3.t3 values(now, 2)
sql insert into d4.t4 values(now, 2)
sql insert into d4.t4 values(now, 2)
sleep 1000
sql select * from d1.t1
sql select * from d1.t1
if $rows != 2 then
if $rows != 2 then
...
@@ -133,40 +165,111 @@ if $rows != 2 then
...
@@ -133,40 +165,111 @@ if $rows != 2 then
endi
endi
sql reset query cache
sql reset query cache
sleep
10
00
sleep
2
00
print ========= step4
print ========= step4
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
sleep 5000
sleep 5000
sql_error insert into d1.t1 values(now, 3)
sql insert into d1.t1 values(now, 3) -x s41
sql_error insert into d2.t2 values(now, 3)
s41:
sql_error insert into d3.t3 values(now, 3)
sql insert into d2.t2 values(now, 3) -x s42
sql_error insert into d4.t4 values(now, 3)
s42:
sql insert into d3.t3 values(now, 3) -x s43
sql_error select * from d1.t1
s43:
sql_error select * from d2.t2
sql insert into d4.t4 values(now, 3) -x s44
sql_error select * from d3.t3
s44:
sql_error select * from d4.t4
sql select * from d1.t1 -x s45
s45:
sql select * from d2.t2 -x s46
s46:
sql select * from d3.t3 -x s47
s47:
sql select * from d4.t4 -x s48
s48:
print ========= step5
print ========= step5
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode2 -s start
sleep 5000
$x = 0
system sh/exec.sh -n dnode3 -s stop -x SIGINT
step5:
sleep 5000
$x = $x + 1
sleep 1000
if $x == 40 then
return -1
endi
sql show d1.vgroups
print online vnodes $data03
if $data03 != 2 then
goto step5
endi
sql show d2.vgroups
print online vnodes $data03
if $data03 != 2 then
goto step5
endi
sql show d3.vgroups
print online vnodes $data03
if $data03 != 2 then
goto step5
endi
sql show d4.vgroups
print online vnodes $data03
if $data03 != 2 then
goto step5
endi
system sh/exec.sh -n dnode3 -s stop -x SIGINT
sql reset query cache
sql reset query cache
sleep 100
0
sleep 100
sql_error insert into d1.t1 values(now, 3)
sql_error insert into d1.t1 values(now, 3) -x s51
sql_error insert into d2.t2 values(now, 3)
s51:
sql_error insert into d3.t3 values(now, 3)
sql_error insert into d2.t2 values(now, 3) -x s52
sql_error insert into d4.t4 values(now, 3)
s52:
sql_error insert into d3.t3 values(now, 3) -x s53
s53:
sql_error insert into d4.t4 values(now, 3) -x s54
s54:
print ========= step6
print ========= step6
system sh/exec.sh -n dnode3 -s start
system sh/exec.sh -n dnode3 -s start
sleep 5000
$x = 0
step6:
$x = $x + 1
sleep 1000
if $x == 40 then
return -1
endi
sql show d1.vgroups
print online vnodes $data03
if $data03 != 2 then
goto step6
endi
sql show d2.vgroups
print online vnodes $data03
if $data03 != 2 then
goto step6
endi
sql show d3.vgroups
print online vnodes $data03
if $data03 != 2 then
goto step6
endi
sql show d4.vgroups
print online vnodes $data03
if $data03 != 2 then
goto step6
endi
sql insert into d1.t1 values(now, 5)
sql insert into d1.t1 values(now, 5)
sql insert into d2.t2 values(now, 5)
sql insert into d2.t2 values(now, 5)
...
@@ -188,9 +291,4 @@ print d4.t4 $rows
...
@@ -188,9 +291,4 @@ print d4.t4 $rows
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/exec.sh -n dnode3 -s stop -x SIGINT
system sh/exec.sh -n dnode3 -s stop -x SIGINT
system sh/exec.sh -n dnode4 -s stop -x SIGINT
\ No newline at end of file
system sh/exec.sh -n dnode5 -s stop -x SIGINT
system sh/exec.sh -n dnode6 -s stop -x SIGINT
system sh/exec.sh -n dnode7 -s stop -x SIGINT
system sh/exec.sh -n dnode8 -s stop -x SIGINT
\ No newline at end of file
tests/script/unique/mnode/mgmt20.sim
浏览文件 @
b340e374
...
@@ -11,7 +11,6 @@ system sh/cfg.sh -n dnode2 -c monitor -v 1
...
@@ -11,7 +11,6 @@ system sh/cfg.sh -n dnode2 -c monitor -v 1
print ============== step1
print ============== step1
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode2 -s start
sleep 3000
sql connect
sql connect
print ============== step2
print ============== step2
...
@@ -20,8 +19,8 @@ sql create dnode $hostname2
...
@@ -20,8 +19,8 @@ sql create dnode $hostname2
$x = 0
$x = 0
show2:
show2:
$x = $x + 1
$x = $x + 1
sleep
2
000
sleep
1
000
if $x ==
1
0 then
if $x ==
2
0 then
return -1
return -1
endi
endi
...
...
tests/script/unique/mnode/mgmt22.sim
浏览文件 @
b340e374
...
@@ -9,7 +9,6 @@ system sh/cfg.sh -n dnode3 -c numOfMnodes -v 2
...
@@ -9,7 +9,6 @@ system sh/cfg.sh -n dnode3 -c numOfMnodes -v 2
print ============== step1
print ============== step1
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect
sql connect
sql show mnodes
sql show mnodes
...
@@ -26,8 +25,8 @@ sql create dnode $hostname2
...
@@ -26,8 +25,8 @@ sql create dnode $hostname2
$x = 0
$x = 0
show2:
show2:
$x = $x + 1
$x = $x + 1
sleep
2
000
sleep
1
000
if $x ==
1
0 then
if $x ==
2
0 then
return -1
return -1
endi
endi
...
@@ -64,8 +63,8 @@ sql connect
...
@@ -64,8 +63,8 @@ sql connect
$x = 0
$x = 0
show6:
show6:
$x = $x + 1
$x = $x + 1
sleep
2
000
sleep
1
000
if $x ==
1
0 then
if $x ==
2
0 then
return -1
return -1
endi
endi
...
@@ -82,13 +81,12 @@ endi
...
@@ -82,13 +81,12 @@ endi
print ============== step7
print ============== step7
system sh/exec.sh -n dnode3 -s start
system sh/exec.sh -n dnode3 -s start
sql create dnode $hostname3
sql create dnode $hostname3
sleep 5000
$x = 0
$x = 0
show7:
show7:
$x = $x + 1
$x = $x + 1
sleep
2
000
sleep
1
000
if $x ==
1
0 then
if $x ==
2
0 then
return -1
return -1
endi
endi
...
...
tests/script/unique/mnode/mgmt23.sim
浏览文件 @
b340e374
...
@@ -25,8 +25,8 @@ sql create dnode $hostname2
...
@@ -25,8 +25,8 @@ sql create dnode $hostname2
$x = 0
$x = 0
show2:
show2:
$x = $x + 1
$x = $x + 1
sleep
2
000
sleep
1
000
if $x ==
1
0 then
if $x ==
2
0 then
return -1
return -1
endi
endi
...
@@ -65,7 +65,14 @@ endi
...
@@ -65,7 +65,14 @@ endi
print ============== step4
print ============== step4
sql drop dnode $hostname2
sql drop dnode $hostname2
sleep 10000
$x = 0
step4:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
endi
sql show mnodes
sql show mnodes
$dnode1Role = $data2_1
$dnode1Role = $data2_1
...
@@ -76,13 +83,13 @@ print dnode2 ==> $dnode2Role
...
@@ -76,13 +83,13 @@ print dnode2 ==> $dnode2Role
print dnode3 ==> $dnode3Role
print dnode3 ==> $dnode3Role
if $dnode1Role != master then
if $dnode1Role != master then
return -1
goto step4
endi
endi
if $dnode2Role != null then
if $dnode2Role != null then
return -1
goto step4
endi
endi
if $dnode3Role != slave then
if $dnode3Role != slave then
return -1
goto step4
endi
endi
system sh/exec.sh -n dnode2 -s stop
system sh/exec.sh -n dnode2 -s stop
...
@@ -93,7 +100,14 @@ sql create dnode $hostname2
...
@@ -93,7 +100,14 @@ sql create dnode $hostname2
system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode2 -i 2
system sh/cfg.sh -n dnode2 -c numOfMnodes -v 2
system sh/cfg.sh -n dnode2 -c numOfMnodes -v 2
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode2 -s start
sleep 8000
$x = 0
step5:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
endi
sql show mnodes
sql show mnodes
$dnode1Role = $data2_1
$dnode1Role = $data2_1
...
@@ -104,19 +118,17 @@ print dnode2 ==> $dnode2Role
...
@@ -104,19 +118,17 @@ print dnode2 ==> $dnode2Role
print dnode3 ==> $dnode3Role
print dnode3 ==> $dnode3Role
if $dnode1Role != master then
if $dnode1Role != master then
return -1
goto step5
endi
endi
if $dnode2Role != null then
if $dnode2Role != null then
return -1
goto step5
endi
endi
if $dnode3Role != slave then
if $dnode3Role != slave then
return -1
goto step5
endi
endi
print ============== step6
print ============== step6
system sh/exec.sh -n dnode1 -s stop
system sh/exec.sh -n dnode1 -s stop
sleep 10000
sql_error show mnodes
sql_error show mnodes
print ============== step7
print ============== step7
...
@@ -126,7 +138,4 @@ system sh/exec.sh -n dnode1 -s stop -x SIGINT
...
@@ -126,7 +138,4 @@ system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/exec.sh -n dnode3 -s stop -x SIGINT
system sh/exec.sh -n dnode3 -s stop -x SIGINT
system sh/exec.sh -n dnode4 -s stop -x SIGINT
system sh/exec.sh -n dnode4 -s stop -x SIGINT
system sh/exec.sh -n dnode5 -s stop -x SIGINT
system sh/exec.sh -n dnode5 -s stop -x SIGINT
system sh/exec.sh -n dnode6 -s stop -x SIGINT
\ No newline at end of file
system sh/exec.sh -n dnode7 -s stop -x SIGINT
system sh/exec.sh -n dnode8 -s stop -x SIGINT
\ No newline at end of file
tests/script/unique/mnode/mgmt33.sim
浏览文件 @
b340e374
...
@@ -28,7 +28,14 @@ endi
...
@@ -28,7 +28,14 @@ endi
print ============== step2
print ============== step2
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode2 -s start
sql create dnode $hostname2
sql create dnode $hostname2
sleep 8000
$x = 0
step2:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show mnodes
sql show mnodes
$dnode1Role = $data2_1
$dnode1Role = $data2_1
...
@@ -39,19 +46,26 @@ print dnode2 ==> $dnode2Role
...
@@ -39,19 +46,26 @@ print dnode2 ==> $dnode2Role
print dnode3 ==> $dnode3Role
print dnode3 ==> $dnode3Role
if $dnode1Role != master then
if $dnode1Role != master then
return -1
goto step2
endi
endi
if $dnode2Role != slave then
if $dnode2Role != slave then
return -1
goto step2
endi
endi
if $dnode3Role != null then
if $dnode3Role != null then
return -1
goto step2
endi
endi
print ============== step3
print ============== step3
system sh/exec.sh -n dnode3 -s start
system sh/exec.sh -n dnode3 -s start
sql create dnode $hostname3
sql create dnode $hostname3
sleep 8000
$x = 0
step3:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show mnodes
sql show mnodes
$dnode1Role = $data2_1
$dnode1Role = $data2_1
...
@@ -62,18 +76,25 @@ print dnode2 ==> $dnode2Role
...
@@ -62,18 +76,25 @@ print dnode2 ==> $dnode2Role
print dnode3 ==> $dnode3Role
print dnode3 ==> $dnode3Role
if $dnode1Role != master then
if $dnode1Role != master then
return -1
goto step3
endi
endi
if $dnode2Role != slave then
if $dnode2Role != slave then
return -1
goto step3
endi
endi
if $dnode3Role != slave then
if $dnode3Role != slave then
return -1
goto step3
endi
endi
print ============== step4
print ============== step4
sql drop dnode $hostname2
sql drop dnode $hostname2
sleep 8000
$x = 0
step4:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show mnodes
sql show mnodes
$dnode1Role = $data2_1
$dnode1Role = $data2_1
...
@@ -84,25 +105,30 @@ print dnode2 ==> $dnode2Role
...
@@ -84,25 +105,30 @@ print dnode2 ==> $dnode2Role
print dnode3 ==> $dnode3Role
print dnode3 ==> $dnode3Role
if $dnode1Role != master then
if $dnode1Role != master then
return -1
goto step4
endi
endi
if $dnode2Role != null then
if $dnode2Role != null then
return -1
goto step4
endi
endi
if $dnode3Role != slave then
if $dnode3Role != slave then
return -1
goto step4
endi
endi
system sh/exec.sh -n dnode2 -s stop
system sh/exec.sh -n dnode2 -s stop
sleep 3000
system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode2 -i 2
system sh/cfg.sh -n dnode2 -c numOfMnodes -v 3
system sh/cfg.sh -n dnode2 -c numOfMnodes -v 3
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode2 -s start
print ============== step5
print ============== step5
sql create dnode $hostname2
sql create dnode $hostname2
sleep 8000
$x = 0
step5:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show mnodes
sql show mnodes
$dnode1Role = $data2_1
$dnode1Role = $data2_1
...
@@ -113,20 +139,26 @@ print dnode2 ==> $dnode2Role
...
@@ -113,20 +139,26 @@ print dnode2 ==> $dnode2Role
print dnode3 ==> $dnode3Role
print dnode3 ==> $dnode3Role
if $dnode1Role != master then
if $dnode1Role != master then
return -1
goto step5
endi
endi
if $dnode2Role != slave then
if $dnode2Role != slave then
return -1
goto step5
endi
endi
if $dnode3Role != slave then
if $dnode3Role != slave then
return -1
goto step5
endi
endi
print ============== step6
print ============== step6
system sh/exec.sh -n dnode1 -s stop
system sh/exec.sh -n dnode1 -s stop
sleep 10000
$x = 0
step6:
sql show mnodes
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show mnodes -x step6
$dnode1Role = $data2_1
$dnode1Role = $data2_1
$dnode2Role = $data2_4
$dnode2Role = $data2_4
$dnode3Role = $data2_3
$dnode3Role = $data2_3
...
@@ -135,7 +167,7 @@ print dnode2 ==> $dnode2Role
...
@@ -135,7 +167,7 @@ print dnode2 ==> $dnode2Role
print dnode3 ==> $dnode3Role
print dnode3 ==> $dnode3Role
if $dnode1Role != offline then
if $dnode1Role != offline then
return -1
goto step6
endi
endi
#if $dnode2Role != master then
#if $dnode2Role != master then
# return -1
# return -1
...
@@ -146,9 +178,15 @@ endi
...
@@ -146,9 +178,15 @@ endi
print ============== step7
print ============== step7
sql drop dnode $hostname1
sql drop dnode $hostname1
sleep 8000
$x = 0
step7:
sql show mnodes
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show mnodes -x step7
$dnode1Role = $data2_1
$dnode1Role = $data2_1
$dnode2Role = $data2_2
$dnode2Role = $data2_2
$dnode3Role = $data2_3
$dnode3Role = $data2_3
...
@@ -157,7 +195,7 @@ print dnode2 ==> $dnode2Role
...
@@ -157,7 +195,7 @@ print dnode2 ==> $dnode2Role
print dnode3 ==> $dnode3Role
print dnode3 ==> $dnode3Role
if $dnode1Role != null then
if $dnode1Role != null then
return -1
goto step7
endi
endi
#if $dnode2Role != master then
#if $dnode2Role != master then
# return -1
# return -1
...
...
tests/script/unique/mnode/mgmt34.sim
浏览文件 @
b340e374
...
@@ -12,7 +12,6 @@ system sh/cfg.sh -n dnode4 -c numOfMnodes -v 3
...
@@ -12,7 +12,6 @@ system sh/cfg.sh -n dnode4 -c numOfMnodes -v 3
print ============== step1
print ============== step1
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect
sql connect
sql show mnodes
sql show mnodes
...
@@ -32,7 +31,13 @@ endi
...
@@ -32,7 +31,13 @@ endi
print ============== step2
print ============== step2
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode2 -s start
sql create dnode $hostname2
sql create dnode $hostname2
sleep 8000
$x = 0
step2:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show mnodes
sql show mnodes
$dnode1Role = $data2_1
$dnode1Role = $data2_1
...
@@ -45,22 +50,29 @@ print dnode3 ==> $dnode3Role
...
@@ -45,22 +50,29 @@ print dnode3 ==> $dnode3Role
print dnode4 ==> $dnode4Role
print dnode4 ==> $dnode4Role
if $dnode1Role != master then
if $dnode1Role != master then
return -1
goto step2
endi
endi
if $dnode2Role != slave then
if $dnode2Role != slave then
return -1
goto step2
endi
endi
if $dnode3Role != null then
if $dnode3Role != null then
return -1
goto step2
endi
endi
if $dnode4Role != null then
if $dnode4Role != null then
return -1
goto step2
endi
endi
print ============== step3
print ============== step3
system sh/exec.sh -n dnode3 -s start
system sh/exec.sh -n dnode3 -s start
sql create dnode $hostname3
sql create dnode $hostname3
sleep 8000
$x = 0
step3:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show mnodes
sql show mnodes
$dnode1Role = $data2_1
$dnode1Role = $data2_1
...
@@ -73,23 +85,29 @@ print dnode3 ==> $dnode3Role
...
@@ -73,23 +85,29 @@ print dnode3 ==> $dnode3Role
print dnode4 ==> $dnode4Role
print dnode4 ==> $dnode4Role
if $dnode1Role != master then
if $dnode1Role != master then
return -1
goto step3
endi
endi
if $dnode2Role != slave then
if $dnode2Role != slave then
return -1
goto step3
endi
endi
if $dnode3Role != slave then
if $dnode3Role != slave then
return -1
goto step3
endi
endi
if $dnode4Role != null then
if $dnode4Role != null then
return -1
goto step3
endi
endi
print ============== step4
print ============== step4
system sh/exec.sh -n dnode4 -s start
system sh/exec.sh -n dnode4 -s start
sql create dnode $hostname4
sql create dnode $hostname4
sleep 8000
$x = 0
step4:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show mnodes
sql show mnodes
$dnode1Role = $data2_1
$dnode1Role = $data2_1
...
@@ -102,21 +120,27 @@ print dnode3 ==> $dnode3Role
...
@@ -102,21 +120,27 @@ print dnode3 ==> $dnode3Role
print dnode4 ==> $dnode4Role
print dnode4 ==> $dnode4Role
if $dnode1Role != master then
if $dnode1Role != master then
return -1
goto step4
endi
endi
if $dnode2Role != slave then
if $dnode2Role != slave then
return -1
goto step4
endi
endi
if $dnode3Role != slave then
if $dnode3Role != slave then
return -1
goto step4
endi
endi
if $dnode4Role != null then
if $dnode4Role != null then
return -1
goto step4
endi
endi
print ============== step5
print ============== step5
sql drop dnode $hostname2
sql drop dnode $hostname2
sleep 8000
$x = 0
step5:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show mnodes
sql show mnodes
$dnode1Role = $data2_1
$dnode1Role = $data2_1
...
@@ -129,28 +153,32 @@ print dnode3 ==> $dnode3Role
...
@@ -129,28 +153,32 @@ print dnode3 ==> $dnode3Role
print dnode4 ==> $dnode4Role
print dnode4 ==> $dnode4Role
if $dnode1Role != master then
if $dnode1Role != master then
return -1
goto step5
endi
endi
if $dnode2Role != null then
if $dnode2Role != null then
return -1
goto step5
endi
endi
if $dnode3Role != slave then
if $dnode3Role != slave then
return -1
goto step5
endi
endi
if $dnode4Role != slave then
if $dnode4Role != slave then
return -1
goto step5
endi
endi
system sh/exec.sh -n dnode2 -s stop
system sh/exec.sh -n dnode2 -s stop
sleep 3000
system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode2 -i 2
system sh/cfg.sh -n dnode2 -c numOfMnodes -v 3
system sh/cfg.sh -n dnode2 -c numOfMnodes -v 3
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode2 -s start
print ============== step6
print ============== step6
sql create dnode $hostname2
sql create dnode $hostname2
sleep 8000
$x = 0
step6:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show mnodes
sql show mnodes
$dnode1Role = $data2_1
$dnode1Role = $data2_1
...
@@ -163,23 +191,29 @@ print dnode3 ==> $dnode3Role
...
@@ -163,23 +191,29 @@ print dnode3 ==> $dnode3Role
print dnode4 ==> $dnode4Role
print dnode4 ==> $dnode4Role
if $dnode1Role != master then
if $dnode1Role != master then
return -1
goto step6
endi
endi
if $dnode2Role != null then
if $dnode2Role != null then
return -1
goto step6
endi
endi
if $dnode3Role != slave then
if $dnode3Role != slave then
return -1
goto step6
endi
endi
if $dnode4Role != slave then
if $dnode4Role != slave then
return -1
goto step6
endi
endi
print ============== step7
print ============== step7
system sh/exec.sh -n dnode1 -s stop
system sh/exec.sh -n dnode1 -s stop
sleep 4000
$x = 0
step7:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show mnodes
sql show mnodes
-x step7
$dnode1Role = $data2_1
$dnode1Role = $data2_1
$dnode2Role = $data2_2
$dnode2Role = $data2_2
$dnode3Role = $data2_3
$dnode3Role = $data2_3
...
@@ -190,14 +224,19 @@ print dnode3 ==> $dnode3Role
...
@@ -190,14 +224,19 @@ print dnode3 ==> $dnode3Role
print dnode4 ==> $dnode4Role
print dnode4 ==> $dnode4Role
if $dnode1Role != offline then
if $dnode1Role != offline then
return -1
goto step7
endi
endi
print ============== step8
print ============== step8
sql drop dnode $hostname1
sql drop dnode $hostname1
sleep 8000
step8:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show mnodes
sql show mnodes
-x step8
$dnode1Role = $data2_1
$dnode1Role = $data2_1
$dnode2Role = $data2_5
$dnode2Role = $data2_5
$dnode3Role = $data2_3
$dnode3Role = $data2_3
...
@@ -208,10 +247,10 @@ print dnode3 ==> $dnode3Role
...
@@ -208,10 +247,10 @@ print dnode3 ==> $dnode3Role
print dnode4 ==> $dnode4Role
print dnode4 ==> $dnode4Role
if $dnode1Role != null then
if $dnode1Role != null then
return -1
goto step8
endi
endi
if $dnode2Role != slave then
if $dnode2Role != slave then
return -1
goto step8
endi
endi
#if $dnode3Role != master then
#if $dnode3Role != master then
# return -1
# return -1
...
...
tests/script/unique/mnode/mgmtr2.sim
浏览文件 @
b340e374
...
@@ -55,6 +55,14 @@ system sh/exec.sh -n dnode2 -s start
...
@@ -55,6 +55,14 @@ system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start
system sh/exec.sh -n dnode3 -s start
print ============== step4
print ============== step4
$x = 0
step4:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
endi
sql show mnodes
sql show mnodes
$dnode1Role = $data2_1
$dnode1Role = $data2_1
...
@@ -65,20 +73,15 @@ print dnode2 ==> $dnode2Role
...
@@ -65,20 +73,15 @@ print dnode2 ==> $dnode2Role
print dnode3 ==> $dnode3Role
print dnode3 ==> $dnode3Role
if $dnode1Role != master then
if $dnode1Role != master then
return -1
goto step4
endi
endi
if $dnode2Role != slave then
if $dnode2Role != slave then
return -1
goto step4
endi
endi
if $dnode3Role != null then
if $dnode3Role != null then
return -1
goto step4
endi
endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/exec.sh -n dnode3 -s stop -x SIGINT
system sh/exec.sh -n dnode3 -s stop -x SIGINT
system sh/exec.sh -n dnode4 -s stop -x SIGINT
\ No newline at end of file
system sh/exec.sh -n dnode5 -s stop -x SIGINT
system sh/exec.sh -n dnode6 -s stop -x SIGINT
system sh/exec.sh -n dnode7 -s stop -x SIGINT
system sh/exec.sh -n dnode8 -s stop -x SIGINT
\ No newline at end of file
tests/script/unique/vnode/many.sim
浏览文件 @
b340e374
...
@@ -23,7 +23,37 @@ sql create dnode $hostname2
...
@@ -23,7 +23,37 @@ sql create dnode $hostname2
sql create dnode $hostname3
sql create dnode $hostname3
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start
system sh/exec.sh -n dnode3 -s start
sleep 3000
$x = 0
step1:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show dnodes
print dnode1 $data4_1
print dnode2 $data4_2
print dnode3 $data4_3
print dnode4 $data4_4
if $data4_1 != ready then
goto step1
endi
if $data4_2 != ready then
goto step1
endi
if $data4_3 != ready then
goto step1
endi
sql show mnodes
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
goto step1
endi
print ========= step1
print ========= step1
sql create database db1 replica 2
sql create database db1 replica 2
...
...
tests/script/unique/vnode/replica2_repeat.sim
浏览文件 @
b340e374
...
@@ -23,7 +23,38 @@ sql create dnode $hostname2
...
@@ -23,7 +23,38 @@ sql create dnode $hostname2
sql create dnode $hostname3
sql create dnode $hostname3
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start
system sh/exec.sh -n dnode3 -s start
sleep 3000
$x = 0
step1:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show dnodes
print dnode1 $data4_1
print dnode2 $data4_2
print dnode3 $data4_3
print dnode4 $data4_4
if $data4_1 != ready then
goto step1
endi
if $data4_2 != ready then
goto step1
endi
if $data4_3 != ready then
goto step1
endi
sql show mnodes
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
goto step1
endi
print ========= step1
print ========= step1
sql create database db replica 2
sql create database db replica 2
...
@@ -64,7 +95,7 @@ print ======== step7
...
@@ -64,7 +95,7 @@ print ======== step7
$lastRows = $data00
$lastRows = $data00
print ======== loop Times $x
print ======== loop Times $x
if $x <
5
then
if $x <
2
then
$x = $x + 1
$x = $x + 1
goto loop
goto loop
endi
endi
...
...
tests/script/unique/vnode/replica3_basic.sim
浏览文件 @
b340e374
...
@@ -16,14 +16,48 @@ sql create dnode $hostname2
...
@@ -16,14 +16,48 @@ sql create dnode $hostname2
sql create dnode $hostname3
sql create dnode $hostname3
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start
system sh/exec.sh -n dnode3 -s start
sleep 3000
$x = 0
step1:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show dnodes
print dnode1 $data4_1
print dnode2 $data4_2
print dnode3 $data4_3
if $data4_1 != ready then
goto step1
endi
if $data4_2 != ready then
goto step1
endi
if $data4_3 != ready then
goto step1
endi
sql show mnodes
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
goto step1
endi
if $data2_2 != slave then
goto step1
endi
if $data2_3 != slave then
goto step1
endi
$N = 10
$N = 10
$table = table_r3
$table = table_r3
$db = db1
$db = db1
sleep 3000
print =================== step 1
print =================== step 1
sql create database $db replica 3
sql create database $db replica 3
...
@@ -66,7 +100,21 @@ endi
...
@@ -66,7 +100,21 @@ endi
print =================== step 4
print =================== step 4
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode2 -s start
sleep 2000
$x = 0
step4:
$x = $x + 1
sleep 1000
if $x == 40 then
return -1
endi
sql show db1.vgroups
print online vnodes $data03
if $data03 != 3 then
goto step4
endi
$y = $x + $N
$y = $x + $N
$expect = $N * 3
$expect = $N * 3
while $x < $y
while $x < $y
...
@@ -83,7 +131,6 @@ endi
...
@@ -83,7 +131,6 @@ endi
print =================== step 5
print =================== step 5
system sh/exec.sh -n dnode3 -s stop
system sh/exec.sh -n dnode3 -s stop
sleep 2000
$y = $x + $N
$y = $x + $N
$expect = $N * 4
$expect = $N * 4
while $x < $y
while $x < $y
...
@@ -100,7 +147,21 @@ endi
...
@@ -100,7 +147,21 @@ endi
print =================== step 6
print =================== step 6
system sh/exec.sh -n dnode3 -s start
system sh/exec.sh -n dnode3 -s start
sleep 2000
$x = 0
step6:
$x = $x + 1
sleep 1000
if $x == 40 then
return -1
endi
sql show db1.vgroups
print online vnodes $data03
if $data03 != 3 then
goto step6
endi
$y = $x + $N
$y = $x + $N
$expect = $N * 5
$expect = $N * 5
while $x < $y
while $x < $y
...
@@ -117,7 +178,6 @@ endi
...
@@ -117,7 +178,6 @@ endi
print =================== step 7
print =================== step 7
system sh/exec.sh -n dnode1 -s stop
system sh/exec.sh -n dnode1 -s stop
sleep 2000
$y = $x + $N
$y = $x + $N
$expect = $N * 6
$expect = $N * 6
while $x < $y
while $x < $y
...
@@ -134,7 +194,21 @@ endi
...
@@ -134,7 +194,21 @@ endi
print =================== step 8
print =================== step 8
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start
sleep 2000
$x = 0
step8:
$x = $x + 1
sleep 1000
if $x == 40 then
return -1
endi
sql show db1.vgroups
print online vnodes $data03
if $data03 != 3 then
goto step8
endi
$y = $x + $N
$y = $x + $N
$expect = $N * 7
$expect = $N * 7
while $x < $y
while $x < $y
...
...
tests/script/unique/vnode/replica3_repeat.sim
浏览文件 @
b340e374
...
@@ -26,7 +26,42 @@ sql create dnode $hostname4
...
@@ -26,7 +26,42 @@ sql create dnode $hostname4
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start
system sh/exec.sh -n dnode3 -s start
system sh/exec.sh -n dnode4 -s start
system sh/exec.sh -n dnode4 -s start
sleep 3000
$x = 0
step1:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show dnodes
print dnode1 $data4_1
print dnode2 $data4_2
print dnode3 $data4_3
print dnode4 $data4_4
if $data4_1 != ready then
goto step1
endi
if $data4_2 != ready then
goto step1
endi
if $data4_3 != ready then
goto step1
endi
if $data4_4 != ready then
goto step1
endi
sql show mnodes
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
goto step1
endi
print ========= step1
print ========= step1
sql create database db replica 3
sql create database db replica 3
...
@@ -75,7 +110,7 @@ print ======== step8
...
@@ -75,7 +110,7 @@ print ======== step8
$lastRows = $data00
$lastRows = $data00
print ======== loop Times $x
print ======== loop Times $x
if $x <
5
then
if $x <
2
then
$x = $x + 1
$x = $x + 1
goto loop
goto loop
endi
endi
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录