Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
742fb1e5
T
TDengine
项目概览
taosdata
/
TDengine
1 年多 前同步成功
通知
1185
Star
22016
Fork
4786
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
742fb1e5
编写于
7月 15, 2022
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
test: adjust some cases
上级
b728833b
变更
17
隐藏空白更改
内联
并排
Showing
17 changed file
with
283 addition
and
1515 deletion
+283
-1515
tests/script/jenkins/basic.txt
tests/script/jenkins/basic.txt
+7
-14
tests/script/tsim/issue/TD-2677.sim
tests/script/tsim/issue/TD-2677.sim
+0
-111
tests/script/tsim/issue/TD-2680.sim
tests/script/tsim/issue/TD-2680.sim
+0
-202
tests/script/tsim/issue/TD-2713.sim
tests/script/tsim/issue/TD-2713.sim
+0
-145
tests/script/tsim/issue/TD-3300.sim
tests/script/tsim/issue/TD-3300.sim
+0
-556
tests/script/tsim/sync/3Replica1VgElect.sim
tests/script/tsim/sync/3Replica1VgElect.sim
+23
-40
tests/script/tsim/sync/3Replica5VgElect.sim
tests/script/tsim/sync/3Replica5VgElect.sim
+23
-40
tests/script/tsim/sync/3Replica5VgElect3mnode.sim
tests/script/tsim/sync/3Replica5VgElect3mnode.sim
+23
-45
tests/script/tsim/sync/3Replica5VgElect3mnodedrop.sim
tests/script/tsim/sync/3Replica5VgElect3mnodedrop.sim
+23
-42
tests/script/tsim/sync/electTest.sim
tests/script/tsim/sync/electTest.sim
+23
-40
tests/script/tsim/sync/oneReplica1VgElect.sim
tests/script/tsim/sync/oneReplica1VgElect.sim
+23
-40
tests/script/tsim/sync/oneReplica1VgElectWithInsert.sim
tests/script/tsim/sync/oneReplica1VgElectWithInsert.sim
+23
-40
tests/script/tsim/sync/oneReplica5VgElect.sim
tests/script/tsim/sync/oneReplica5VgElect.sim
+23
-40
tests/script/tsim/sync/threeReplica1VgElect.sim
tests/script/tsim/sync/threeReplica1VgElect.sim
+23
-40
tests/script/tsim/sync/threeReplica1VgElectWihtInsert.sim
tests/script/tsim/sync/threeReplica1VgElectWihtInsert.sim
+23
-40
tests/script/tsim/sync/vnodesnapshot-test.sim
tests/script/tsim/sync/vnodesnapshot-test.sim
+23
-40
tests/script/tsim/sync/vnodesnapshot.sim
tests/script/tsim/sync/vnodesnapshot.sim
+23
-40
未找到文件。
tests/script/jenkins/basic.txt
浏览文件 @
742fb1e5
...
...
@@ -350,7 +350,6 @@
./test.sh -f tsim/sync/3Replica5VgElect.sim
./test.sh -f tsim/sync/oneReplica1VgElect.sim
./test.sh -f tsim/sync/oneReplica5VgElect.sim
# ./test.sh -f tsim/sync/3Replica5VgElect3mnode.sim
# --- catalog
./test.sh -f tsim/catalog/alterInCurrent.sim
...
...
@@ -433,12 +432,6 @@
# ---- wal
./test.sh -f tsim/wal/kill.sim
# ---- issue
#./test.sh -f tsim/issue/TD-2677.sim
#./test.sh -f tsim/issue/TD-2680.sim
#./test.sh -f tsim/issue/TD-2713.sim
#./test.sh -f tsim/issue/TD-3300.sim
# ---- tag
./test.sh -f tsim/tag/3.sim
./test.sh -f tsim/tag/4.sim
...
...
@@ -451,18 +444,18 @@
./test.sh -f tsim/tag/bool_binary.sim
./test.sh -f tsim/tag/bool_int.sim
./test.sh -f tsim/tag/bool.sim
#./test.sh -f tsim/tag/change.sim
#./test.sh -f tsim/tag/column.sim
#./test.sh -f tsim/tag/commit.sim
#./test.sh -f tsim/tag/create.sim
#./test.sh -f tsim/tag/delete.sim
#
./test.sh -f tsim/tag/change.sim
#
./test.sh -f tsim/tag/column.sim
#
./test.sh -f tsim/tag/commit.sim
#
./test.sh -f tsim/tag/create.sim
#
./test.sh -f tsim/tag/delete.sim
# jira ./test.sh -f tsim/tag/double.sim
#./test.sh -f tsim/tag/filter.sim
#
./test.sh -f tsim/tag/filter.sim
# jira ./test.sh -f tsim/tag/float.sim
./test.sh -f tsim/tag/int_binary.sim
./test.sh -f tsim/tag/int_float.sim
./test.sh -f tsim/tag/int.sim
#./test.sh -f tsim/tag/set.sim
#
./test.sh -f tsim/tag/set.sim
./test.sh -f tsim/tag/smallint.sim
./test.sh -f tsim/tag/tinyint.sim
...
...
tests/script/tsim/issue/TD-2677.sim
已删除
100644 → 0
浏览文件 @
b728833b
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode3 -i 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 dnode3 -c numOfMnodes -v 3
system sh/cfg.sh -n dnode1 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode2 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode3 -c mnodeEqualVnodeNum -v 4
print ============== deploy
system sh/exec.sh -n dnode1 -s start
sql connect
sql create dnode $hostname2
sql create dnode $hostname3
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start
print =============== step1
$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
$mnode1Role = $data2_1
print mnode1Role $mnode1Role
$mnode2Role = $data2_2
print mnode2Role $mnode2Role
$mnode3Role = $data2_3
print mnode3Role $mnode3Role
if $mnode1Role != master then
goto step1
endi
if $mnode2Role != slave then
goto step1
endi
if $mnode3Role != slave then
goto step1
endi
$x = 1
show2:
print =============== step1
sql create database d1 replica 2 quorum 2
sql create table d1.t1 (ts timestamp, i int)
sql_error create table d1.t1 (ts timestamp, i int)
sql insert into d1.t1 values(now, 1)
sql select * from d1.t1;
if $rows != 1 then
return -1
endi
print =============== step2
sql create database d2 replica 3 quorum 2
sql create table d2.t1 (ts timestamp, i int)
sql_error create table d2.t1 (ts timestamp, i int)
sql insert into d2.t1 values(now, 1)
sql select * from d2.t1;
if $rows != 1 then
return -1
endi
print =============== step3
sql create database d4 replica 1 quorum 1
sql_error create database d5 replica 1 quorum 2
sql_error create database d6 replica 1 quorum 3
sql_error create database d7 replica 1 quorum 4
sql_error create database d8 replica 1 quorum 0
sql create database d9 replica 2 quorum 1
sql create database d10 replica 2 quorum 2
sql_error create database d11 replica 2 quorum 3
sql_error create database d12 replica 2 quorum 4
sql_error create database d12 replica 2 quorum 0
sql create database d13 replica 3 quorum 1
sql create database d14 replica 3 quorum 2
sql_error create database d15 replica 3 quorum 3
sql_error create database d16 replica 3 quorum 4
sql_error create database d17 replica 3 quorum 0
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 dnode3 -s stop -x SIGINT
system sh/exec.sh -n dnode4 -s stop -x SIGINT
tests/script/tsim/issue/TD-2680.sim
已删除
100644 → 0
浏览文件 @
b728833b
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode3 -i 3
system sh/deploy.sh -n dnode4 -i 4
system sh/cfg.sh -n dnode1 -c numOfMnodes -v 1
system sh/cfg.sh -n dnode2 -c numOfMnodes -v 1
system sh/cfg.sh -n dnode3 -c numOfMnodes -v 1
system sh/cfg.sh -n dnode4 -c numOfMnodes -v 1
system sh/cfg.sh -n dnode1 -c walLevel -v 2
system sh/cfg.sh -n dnode2 -c walLevel -v 2
system sh/cfg.sh -n dnode3 -c walLevel -v 2
system sh/cfg.sh -n dnode4 -c walLevel -v 2
system sh/cfg.sh -n dnode1 -c balanceInterval -v 10
system sh/cfg.sh -n dnode2 -c balanceInterval -v 10
system sh/cfg.sh -n dnode3 -c balanceInterval -v 10
system sh/cfg.sh -n dnode4 -c balanceInterval -v 10
system sh/cfg.sh -n dnode1 -c role -v 1
system sh/cfg.sh -n dnode2 -c role -v 2
system sh/cfg.sh -n dnode3 -c role -v 2
system sh/cfg.sh -n dnode4 -c role -v 2
system sh/cfg.sh -n dnode1 -c arbitrator -v $arbitrator
system sh/cfg.sh -n dnode2 -c arbitrator -v $arbitrator
system sh/cfg.sh -n dnode3 -c arbitrator -v $arbitrator
system sh/cfg.sh -n dnode4 -c arbitrator -v $arbitrator
print ============== step0
system sh/exec_tarbitrator.sh -s start
print ============== step1
system sh/exec.sh -n dnode1 -s start
sql connect
sql create dnode $hostname2
sql create dnode $hostname3
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start
$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
print ============== step2
sql show dnodes
if $rows != 4 then
return -1
endi
print $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07
print $data10 $data11 $data12 $data13 $data14 $data15 $data16 $data17
print $data20 $data21 $data22 $data23 $data24 $data25 $data26 $data27
print $data30 $data31 $data32 $data33 $data34 $data35 $data36 $data37
if $data30 != 0 then
return -1
endi
if $data32 != 0 then
return -1
endi
if $data33 != 0 then
return -1
endi
if $data34 != ready then
return -1
endi
if $data35 != arb then
return -1
endi
if $data37 != - then
return -1
endi
print ============== step4
system sh/exec_tarbitrator.sh -s stop
$x = 0
step4:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
endi
sql show dnodes
if $rows != 4 then
return -1
endi
print $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07
print $data10 $data11 $data12 $data13 $data14 $data15 $data16 $data17
print $data20 $data21 $data22 $data23 $data24 $data25 $data26 $data27
print $data30 $data31 $data32 $data33 $data34 $data35 $data36 $data37
if $data30 != 0 then
return -1
endi
if $data32 != 0 then
return -1
endi
if $data33 != 0 then
return -1
endi
if $data34 != offline then
goto step4
endi
if $data35 != arb then
return -1
endi
if $data37 != - then
return -1
endi
print ============== step5
system sh/exec_tarbitrator.sh -s start
$x = 0
step5:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
endi
sql show dnodes
if $rows != 4 then
return -1
endi
print $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07
print $data10 $data11 $data12 $data13 $data14 $data15 $data16 $data17
print $data20 $data21 $data22 $data23 $data24 $data25 $data26 $data27
print $data30 $data31 $data32 $data33 $data34 $data35 $data36 $data37
if $data30 != 0 then
return -1
endi
if $data32 != 0 then
return -1
endi
if $data33 != 0 then
return -1
endi
if $data34 != ready then
goto step5
endi
if $data35 != arb then
return -1
endi
if $data37 != - then
return -1
endi
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 dnode3 -s stop -x SIGINT
system sh/exec.sh -n dnode4 -s stop -x SIGINT
tests/script/tsim/issue/TD-2713.sim
已删除
100644 → 0
浏览文件 @
b728833b
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode3 -i 3
system sh/deploy.sh -n dnode4 -i 4
system sh/cfg.sh -n dnode1 -c wallevel -v 2
system sh/cfg.sh -n dnode2 -c wallevel -v 2
system sh/cfg.sh -n dnode3 -c wallevel -v 2
system sh/cfg.sh -n dnode4 -c wallevel -v 2
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 dnode3 -c numOfMnodes -v 3
system sh/cfg.sh -n dnode4 -c numOfMnodes -v 3
system sh/cfg.sh -n dnode1 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode2 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode3 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode4 -c mnodeEqualVnodeNum -v 4
system sh/cfg.sh -n dnode1 -c slaveQuery -v 1
system sh/cfg.sh -n dnode2 -c slaveQuery -v 1
system sh/cfg.sh -n dnode3 -c slaveQuery -v 1
system sh/cfg.sh -n dnode4 -c slaveQuery -v 1
print ========= step1
system sh/exec.sh -n dnode1 -s start
sql connect
sql create dnode $hostname2
sql create dnode $hostname3
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start
$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
print ========= step2
sql create database d1 replica 3
sql create table d1.t1 (ts timestamp, i int)
sql insert into d1.t1 values(now, 1)
$x = 0
step2:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show d1.vgroups
print online vgroups: $data03
if $data03 != 3 then
goto step2
endi
sleep 1000
print ========= step3
$i = 0
while $i < 100
$i = $i + 1
sql select * from d1.t1
print d1.t1 rows: $rows
if $rows != 1 then
return -1
endi
endw
print ========= step4
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 dnode3 -s stop -x SIGINT
system rm -rf ../../../sim/dnode3/data/vnode/vnode2/tsdb/data/*
system rm -rf ../../../sim/dnode3/data/vnode/vnode2/version.json
system sh/exec.sh -n dnode1 -s start -x SIGINT
system sh/exec.sh -n dnode2 -s start -x SIGINT
system sh/exec.sh -n dnode3 -s start -x SIGINT
$x = 0
step4:
$x = $x + 1
sleep 1000
if $x == 30 then
return -1
endi
sql show d1.vgroups
print online vgroups: $data03
if $data03 != 3 then
goto step4
endi
sleep 1000
print ========= step5
$i = 0
while $i < 100
$i = $i + 1
sql select * from d1.t1
if $rows != 1 then
return -1
endi
print d1.t1 rows: $rows
endw
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 dnode3 -s stop -x SIGINT
system sh/exec.sh -n dnode4 -s stop -x SIGINT
tests/script/tsim/issue/TD-3300.sim
已删除
100644 → 0
浏览文件 @
b728833b
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode3 -i 3
system sh/deploy.sh -n dnode4 -i 4
system sh/cfg.sh -n dnode1 -c numOfMnodes -v 1
system sh/cfg.sh -n dnode2 -c numOfMnodes -v 1
system sh/cfg.sh -n dnode3 -c numOfMnodes -v 1
system sh/cfg.sh -n dnode4 -c numOfMnodes -v 1
system sh/cfg.sh -n dnode1 -c role -v 1
system sh/cfg.sh -n dnode2 -c role -v 2
system sh/cfg.sh -n dnode3 -c role -v 2
system sh/cfg.sh -n dnode4 -c role -v 2
system sh/cfg.sh -n dnode1 -c arbitrator -v $arbitrator
system sh/cfg.sh -n dnode2 -c arbitrator -v $arbitrator
system sh/cfg.sh -n dnode3 -c arbitrator -v $arbitrator
system sh/cfg.sh -n dnode4 -c arbitrator -v $arbitrator
print ============== step0: start tarbitrator
system sh/exec_tarbitrator.sh -s start
print ============== step1: start dnode1, only deploy mnode
system sh/exec.sh -n dnode1 -s start
sql connect
print ============== step2: start dnode2/dnode3
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start
sql create dnode $hostname2
sql create dnode $hostname3
$x = 0
step2:
$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 step2
endi
if $data4_2 != ready then
goto step2
endi
if $data4_3 != ready then
goto step2
endi
sleep 1000
print ============== step3
sql create database db replica 2
sql use db
sql create table stb (ts timestamp, c1 int, c2 int) tags(t1 int)
sql create table t1 using stb tags(1)
sql insert into t1 values(1577980800000, 1, 5)
sql insert into t1 values(1577980800001, 2, 4)
sql insert into t1 values(1577980800002, 3, 3)
sql insert into t1 values(1577980800003, 4, 2)
sql insert into t1 values(1577980800004, 5, 1)
sql show db.vgroups
if $data04 != 3 then
return -1
endi
if $data06 != 2 then
return -1
endi
if $data05 != master then
return -1
endi
if $data07 != slave then
return -1
endi
sql select * from t1
if $rows != 5 then
return -1
endi
system sh/exec.sh -n dnode2 -s stop -x SIGKILL
system sh/exec.sh -n dnode3 -s stop -x SIGKILL
print ============== step4
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start
$x = 0
step4:
$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 step4
endi
if $data4_2 != ready then
goto step4
endi
if $data4_3 != ready then
goto step4
endi
sql show db.vgroups
if $data04 != 3 then
goto step4
endi
if $data06 != 2 then
goto step4
endi
if $data05 != master then
goto step4
endi
if $data07 != slave then
goto step4
endi
sql create table t2 using stb tags(1)
sql insert into t2 values(1577980800000, 1, 5)
sql insert into t2 values(1577980800001, 2, 4)
sql insert into t2 values(1577980800002, 3, 3)
sql insert into t2 values(1577980800003, 4, 2)
sql insert into t2 values(1577980800004, 5, 1)
sql select * from t2
if $rows != 5 then
return -1
endi
print ============== step5
system sh/exec.sh -n dnode3 -s stop -x SIGKILL
$x = 0
step5:
$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 step5
endi
if $data4_2 != ready then
goto step5
endi
if $data4_3 != offline then
goto step5
endi
sql select * from t1
if $rows != 5 then
return -1
endi
sql select * from t2
if $rows != 5 then
return -1
endi
sql show db.vgroups
if $data04 != 3 then
goto step5
endi
if $data06 != 2 then
goto step5
endi
if $data05 != offline then
goto step5
endi
if $data07 != master then
goto step5
endi
print ============== step6
sql create table t3 using stb tags(1)
sql insert into t3 values(1577980800000, 1, 5)
sql insert into t3 values(1577980800001, 2, 4)
sql insert into t3 values(1577980800002, 3, 3)
sql insert into t3 values(1577980800003, 4, 2)
sql insert into t3 values(1577980800004, 5, 1)
sql insert into t3 values(1577980800010, 11, 5)
sql insert into t3 values(1577980800011, 12, 4)
sql insert into t3 values(1577980800012, 13, 3)
sql insert into t3 values(1577980800013, 14, 2)
sql insert into t3 values(1577980800014, 15, 1)
sql select * from t1
if $rows != 5 then
return -1
endi
sql select * from t2
if $rows != 5 then
return -1
endi
sql select * from t3
if $rows != 10 then
return -1
endi
system sh/exec.sh -n dnode3 -s start
$x = 0
step6:
$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 step6
endi
if $data4_2 != ready then
goto step6
endi
if $data4_3 != ready then
goto step6
endi
sql show db.vgroups
if $data04 != 3 then
goto step6
endi
if $data06 != 2 then
goto step6
endi
if $data05 != slave then
goto step6
endi
if $data07 != master then
goto step6
endi
sql select * from t1
if $rows != 5 then
return -1
endi
sql select * from t2
if $rows != 5 then
return -1
endi
sql select * from t3
if $rows != 10 then
return -1
endi
print ============== step7
sql create table t4 using stb tags(1)
sql insert into t4 values(1577980800000, 1, 5)
sql insert into t4 values(1577980800001, 2, 4)
sql insert into t4 values(1577980800002, 3, 3)
sql insert into t4 values(1577980800003, 4, 2)
sql insert into t4 values(1577980800004, 5, 1)
sql insert into t4 values(1577980800010, 11, 5)
sql insert into t4 values(1577980800011, 12, 4)
sql insert into t4 values(1577980800012, 13, 3)
sql insert into t4 values(1577980800013, 14, 2)
sql insert into t4 values(1577980800014, 15, 1)
sql insert into t4 values(1577980800020, 21, 5)
sql insert into t4 values(1577980800021, 22, 4)
sql insert into t4 values(1577980800022, 23, 3)
sql insert into t4 values(1577980800023, 24, 2)
sql insert into t4 values(1577980800024, 25, 1)
sql select * from t1
if $rows != 5 then
return -1
endi
sql select * from t2
if $rows != 5 then
return -1
endi
sql select * from t3
if $rows != 10 then
return -1
endi
sql select * from t4
if $rows != 15 then
return -1
endi
system sh/exec.sh -n dnode2 -s stop -x SIGKILL
$x = 0
step7:
$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 step7
endi
if $data4_2 != offline then
goto step7
endi
if $data4_3 != ready then
goto step7
endi
sql show db.vgroups
if $data04 != 3 then
goto step7
endi
if $data06 != 2 then
goto step7
endi
if $data05 != master then
goto step7
endi
if $data07 != offline then
goto step7
endi
sql select * from t1
if $rows != 5 then
return -1
endi
sql select * from t2
if $rows != 5 then
return -1
endi
sql select * from t3
if $rows != 10 then
return -1
endi
sql select * from t4
if $rows != 15 then
return -1
endi
print ============== step8
sql create table t5 using stb tags(1)
sql insert into t5 values(1577980800000, 1, 5)
sql insert into t5 values(1577980800001, 2, 4)
sql insert into t5 values(1577980800002, 3, 3)
sql insert into t5 values(1577980800003, 4, 2)
sql insert into t5 values(1577980800004, 5, 1)
sql insert into t5 values(1577980800010, 11, 5)
sql select * from t1
if $rows != 5 then
return -1
endi
sql select * from t2
if $rows != 5 then
return -1
endi
sql select * from t3
if $rows != 10 then
return -1
endi
sql select * from t4
if $rows != 15 then
return -1
endi
sql select * from t5
if $rows != 6 then
return -1
endi
system sh/exec.sh -n dnode2 -s start
$x = 0
step8:
$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 step8
endi
if $data4_2 != ready then
goto step8
endi
if $data4_3 != ready then
goto step8
endi
sql show db.vgroups
if $data04 != 3 then
goto step8
endi
if $data06 != 2 then
goto step8
endi
if $data05 != master then
goto step8
endi
if $data07 != slave then
goto step8
endi
sql select * from t1
if $rows != 5 then
return -1
endi
sql select * from t2
if $rows != 5 then
return -1
endi
sql select * from t3
if $rows != 10 then
return -1
endi
sql select * from t4
if $rows != 15 then
return -1
endi
sql select * from t5
if $rows != 6 then
return -1
endi
print ============== step9
sql create table t6 using stb tags(1)
sql insert into t6 values(1577980800000, 1, 5)
sql insert into t6 values(1577980800001, 2, 4)
sql insert into t6 values(1577980800002, 3, 3)
sql insert into t6 values(1577980800003, 4, 2)
sql insert into t6 values(1577980800004, 5, 1)
sql insert into t6 values(1577980800010, 11, 5)
sql insert into t6 values(1577980800011, 12, 4)
sql select * from t1
if $rows != 5 then
return -1
endi
sql select * from t2
if $rows != 5 then
return -1
endi
sql select * from t3
if $rows != 10 then
return -1
endi
sql select * from t4
if $rows != 15 then
return -1
endi
sql select * from t5
if $rows != 6 then
return -1
endi
sql select * from t6
if $rows != 7 then
return -1
endi
system sh/exec.sh -n dnode3 -s stop -x SIGKILL
$x = 0
step9:
$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 step9
endi
if $data4_2 != ready then
goto step9
endi
if $data4_3 != offline then
goto step9
endi
print ============== 2
sql show db.vgroups
if $data04 != 3 then
goto step7
endi
if $data06 != 2 then
goto step7
endi
if $data05 != offline then
goto step7
endi
if $data07 != master then
goto step7
endi
print ============== 3
sql select * from t1
if $rows != 5 then
return -1
endi
sql select * from t2
if $rows != 5 then
return -1
endi
sql select * from t3
if $rows != 10 then
return -1
endi
sql select * from t4
if $rows != 15 then
return -1
endi
sql select * from t5
if $rows != 6 then
return -1
endi
sql select * from t6
if $rows != 7 then
return -1
endi
system sh/exec.sh -n dnode1 -s stop
system sh/exec.sh -n dnode2 -s stop
system sh/exec.sh -n dnode3 -s stop
tests/script/tsim/sync/3Replica1VgElect.sim
浏览文件 @
742fb1e5
...
...
@@ -11,55 +11,38 @@ system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start
system sh/exec.sh -n dnode4 -s start
$loop_cnt = 0
check_dnode_ready:
$loop_cnt = $loop_cnt + 1
sleep 200
if $loop_cnt == 10 then
print ====> dnode not ready!
return -1
endi
sql show dnodes
print ===> $rows $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $data[0][6]
print ===> $rows $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4] $data[1][5] $data[1][6]
print ===> $rows $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4] $data[2][5] $data[2][6]
print ===> $rows $data[3][0] $data[3][1] $data[3][2] $data[3][3] $data[3][4] $data[3][5] $data[3][6]
if $data[0][0] != 1 then
return -1
endi
if $data[0][4] != ready then
goto check_dnode_ready
endi
sql connect
sql create dnode $hostname port 7200
sql create dnode $hostname port 7300
sql create dnode $hostname port 7400
$
loop_cnt
= 0
check_dnode_ready_
1:
$loop_cnt = $loop_cnt
+ 1
sleep 2
00
if $loop_cnt
== 10 then
print ====> dnodes
not ready!
return -1
endi
$
x
= 0
step
1:
$x = $x
+ 1
sleep 10
00
if $x
== 10 then
print ====> dnode
not ready!
return -1
endi
sql show dnodes
print ===> $
rows $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $data[0][6]
print ===> $
rows $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4] $data[1][5] $data[1][6]
print ===> $
rows $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4] $data[2][5] $data[2][6]
print ===> $
rows $data[3][0] $data[3][1] $data[3][2] $data[3][3] $data[3][4] $data[3][5] $data[3][6]
if $
data[0][4] != ready
then
goto check_dnode_ready_
1
print ===> $
data00 $data01 $data02 $data03 $data04 $data05
print ===> $
data10 $data11 $data12 $data13 $data14 $data15
print ===> $
data20 $data21 $data22 $data23 $data24 $data25
print ===> $
data30 $data31 $data32 $data33 $data34 $data35
if $
rows != 4
then
return -
1
endi
if $data
[1]
[4] != ready then
goto
check_dnode_ready_
1
if $data
(1)
[4] != ready then
goto
step
1
endi
if $data
[2]
[4] != ready then
goto
check_dnode_ready_
1
if $data
(2)
[4] != ready then
goto
step
1
endi
if $data[3][4] != ready then
goto check_dnode_ready_1
if $data(3)[4] != ready then
goto step1
endi
if $data(4)[4] != ready then
goto step1
endi
$replica = 3
...
...
tests/script/tsim/sync/3Replica5VgElect.sim
浏览文件 @
742fb1e5
...
...
@@ -11,55 +11,38 @@ system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start
system sh/exec.sh -n dnode4 -s start
$loop_cnt = 0
check_dnode_ready:
$loop_cnt = $loop_cnt + 1
sleep 200
if $loop_cnt == 10 then
print ====> dnode not ready!
return -1
endi
sql show dnodes
print ===> $rows $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $data[0][6]
print ===> $rows $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4] $data[1][5] $data[1][6]
print ===> $rows $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4] $data[2][5] $data[2][6]
print ===> $rows $data[3][0] $data[3][1] $data[3][2] $data[3][3] $data[3][4] $data[3][5] $data[3][6]
if $data[0][0] != 1 then
return -1
endi
if $data[0][4] != ready then
goto check_dnode_ready
endi
sql connect
sql create dnode $hostname port 7200
sql create dnode $hostname port 7300
sql create dnode $hostname port 7400
$
loop_cnt
= 0
check_dnode_ready_
1:
$loop_cnt = $loop_cnt
+ 1
sleep 2
00
if $loop_cnt
== 10 then
print ====> dnodes
not ready!
return -1
endi
$
x
= 0
step
1:
$x = $x
+ 1
sleep 10
00
if $x
== 10 then
print ====> dnode
not ready!
return -1
endi
sql show dnodes
print ===> $
rows $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $data[0][6]
print ===> $
rows $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4] $data[1][5] $data[1][6]
print ===> $
rows $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4] $data[2][5] $data[2][6]
print ===> $
rows $data[3][0] $data[3][1] $data[3][2] $data[3][3] $data[3][4] $data[3][5] $data[3][6]
if $
data[0][4] != ready
then
goto check_dnode_ready_
1
print ===> $
data00 $data01 $data02 $data03 $data04 $data05
print ===> $
data10 $data11 $data12 $data13 $data14 $data15
print ===> $
data20 $data21 $data22 $data23 $data24 $data25
print ===> $
data30 $data31 $data32 $data33 $data34 $data35
if $
rows != 4
then
return -
1
endi
if $data
[1]
[4] != ready then
goto
check_dnode_ready_
1
if $data
(1)
[4] != ready then
goto
step
1
endi
if $data
[2]
[4] != ready then
goto
check_dnode_ready_
1
if $data
(2)
[4] != ready then
goto
step
1
endi
if $data[3][4] != ready then
goto check_dnode_ready_1
if $data(3)[4] != ready then
goto step1
endi
if $data(4)[4] != ready then
goto step1
endi
$replica = 3
...
...
tests/script/tsim/sync/3Replica5VgElect3mnode.sim
浏览文件 @
742fb1e5
...
...
@@ -3,66 +3,44 @@ system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode3 -i 3
system sh/deploy.sh -n dnode4 -i 4
system sh/cfg.sh -n dnode1 -c supportVnodes -v 0
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start
system sh/exec.sh -n dnode4 -s start
### create clusters using four dnodes;
$loop_cnt = 0
check_dnode_ready:
$loop_cnt = $loop_cnt + 1
sleep 200
if $loop_cnt == 10 then
print ====> 1-dnode not ready!
return -1
endi
sql show dnodes
print ===> $rows $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $data[0][6]
print ===> $rows $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4] $data[1][5] $data[1][6]
print ===> $rows $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4] $data[2][5] $data[2][6]
print ===> $rows $data[3][0] $data[3][1] $data[3][2] $data[3][3] $data[3][4] $data[3][5] $data[3][6]
if $data[0][0] != 1 then
return -1
endi
if $data[0][4] != ready then
goto check_dnode_ready
endi
sql connect
sql create dnode $hostname port 7200
sql create dnode $hostname port 7300
sql create dnode $hostname port 7400
$
loop_cnt
= 0
check_dnode_ready_
1:
$loop_cnt = $loop_cnt
+ 1
sleep 2
00
if $loop_cnt
== 10 then
print ====> dnodes
not ready!
return -1
endi
$
x
= 0
step
1:
$x = $x
+ 1
sleep 10
00
if $x
== 10 then
print ====> dnode
not ready!
return -1
endi
sql show dnodes
print ===> $
rows $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $data[0][6]
print ===> $
rows $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4] $data[1][5] $data[1][6]
print ===> $
rows $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4] $data[2][5] $data[2][6]
print ===> $
rows $data[3][0] $data[3][1] $data[3][2] $data[3][3] $data[3][4] $data[3][5] $data[3][6]
if $
data[0][4] != ready
then
goto check_dnode_ready_
1
print ===> $
data00 $data01 $data02 $data03 $data04 $data05
print ===> $
data10 $data11 $data12 $data13 $data14 $data15
print ===> $
data20 $data21 $data22 $data23 $data24 $data25
print ===> $
data30 $data31 $data32 $data33 $data34 $data35
if $
rows != 4
then
return -
1
endi
if $data
[1]
[4] != ready then
goto
check_dnode_ready_
1
if $data
(1)
[4] != ready then
goto
step
1
endi
if $data
[2]
[4] != ready then
goto
check_dnode_ready_
1
if $data
(2)
[4] != ready then
goto
step
1
endi
if $data[3][4] != ready then
goto check_dnode_ready_1
if $data(3)[4] != ready then
goto step1
endi
if $data(4)[4] != ready then
goto step1
endi
$replica = 3
...
...
tests/script/tsim/sync/3Replica5VgElect3mnodedrop.sim
浏览文件 @
742fb1e5
...
...
@@ -11,57 +11,38 @@ system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start
system sh/exec.sh -n dnode4 -s start
print ===> create clusters using four dnodes;
$loop_cnt = 0
check_dnode_ready:
$loop_cnt = $loop_cnt + 1
sleep 200
if $loop_cnt == 10 then
print ====> 1-dnode not ready!
return -1
endi
sql show dnodes
print ===> $rows $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $data[0][6]
print ===> $rows $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4] $data[1][5] $data[1][6]
print ===> $rows $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4] $data[2][5] $data[2][6]
print ===> $rows $data[3][0] $data[3][1] $data[3][2] $data[3][3] $data[3][4] $data[3][5] $data[3][6]
if $data[0][0] != 1 then
return -1
endi
if $data[0][4] != ready then
goto check_dnode_ready
endi
sql connect
sql create dnode $hostname port 7200
sql create dnode $hostname port 7300
sql create dnode $hostname port 7400
$
loop_cnt
= 0
check_dnode_ready_
1:
$loop_cnt = $loop_cnt
+ 1
sleep 2
00
if $loop_cnt
== 10 then
print ====> dnodes
not ready!
return -1
endi
$
x
= 0
step
1:
$x = $x
+ 1
sleep 10
00
if $x
== 10 then
print ====> dnode
not ready!
return -1
endi
sql show dnodes
print ===> $rows $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $data[0][6]
print ===> $rows $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4] $data[1][5] $data[1][6]
print ===> $rows $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4] $data[2][5] $data[2][6]
print ===> $rows $data[3][0] $data[3][1] $data[3][2] $data[3][3] $data[3][4] $data[3][5] $data[3][6]
if $data[0][4] != ready then
goto check_dnode_ready_1
print ===> $data00 $data01 $data02 $data03 $data04 $data05
print ===> $data10 $data11 $data12 $data13 $data14 $data15
print ===> $data20 $data21 $data22 $data23 $data24 $data25
print ===> $data30 $data31 $data32 $data33 $data34 $data35
if $rows != 4 then
return -1
endi
if $data(1)[4] != ready then
goto step1
endi
if $data
[1]
[4] != ready then
goto
check_dnode_ready_
1
if $data
(2)
[4] != ready then
goto
step
1
endi
if $data
[2]
[4] != ready then
goto
check_dnode_ready_
1
if $data
(3)
[4] != ready then
goto
step
1
endi
if $data
[3]
[4] != ready then
goto
check_dnode_ready_
1
if $data
(4)
[4] != ready then
goto
step
1
endi
$replica = 3
...
...
tests/script/tsim/sync/electTest.sim
浏览文件 @
742fb1e5
...
...
@@ -11,55 +11,38 @@ system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start
system sh/exec.sh -n dnode4 -s start
$loop_cnt = 0
check_dnode_ready:
$loop_cnt = $loop_cnt + 1
sleep 200
if $loop_cnt == 10 then
print ====> dnode not ready!
return -1
endi
sql show dnodes
print ===> $rows $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $data[0][6]
print ===> $rows $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4] $data[1][5] $data[1][6]
print ===> $rows $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4] $data[2][5] $data[2][6]
print ===> $rows $data[3][0] $data[3][1] $data[3][2] $data[3][3] $data[3][4] $data[3][5] $data[3][6]
if $data[0][0] != 1 then
return -1
endi
if $data[0][4] != ready then
goto check_dnode_ready
endi
sql connect
sql create dnode $hostname port 7200
sql create dnode $hostname port 7300
sql create dnode $hostname port 7400
$
loop_cnt
= 0
check_dnode_ready_
1:
$loop_cnt = $loop_cnt
+ 1
sleep 2
00
if $loop_cnt
== 10 then
print ====> dnodes
not ready!
return -1
endi
$
x
= 0
step
1:
$x = $x
+ 1
sleep 10
00
if $x
== 10 then
print ====> dnode
not ready!
return -1
endi
sql show dnodes
print ===> $rows $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $data[0][6]
print ===> $rows $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4] $data[1][5] $data[1][6]
print ===> $rows $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4] $data[2][5] $data[2][6]
print ===> $rows $data[3][0] $data[3][1] $data[3][2] $data[3][3] $data[3][4] $data[3][5] $data[3][6]
if $data[0][4] != ready then
goto check_dnode_ready_1
print ===> $data00 $data01 $data02 $data03 $data04 $data05
print ===> $data10 $data11 $data12 $data13 $data14 $data15
print ===> $data20 $data21 $data22 $data23 $data24 $data25
print ===> $data30 $data31 $data32 $data33 $data34 $data35
if $rows != 4 then
return -1
endi
if $data(1)[4] != ready then
goto step1
endi
if $data
[1]
[4] != ready then
goto
check_dnode_ready_
1
if $data
(2)
[4] != ready then
goto
step
1
endi
if $data
[2]
[4] != ready then
goto
check_dnode_ready_
1
if $data
(3)
[4] != ready then
goto
step
1
endi
if $data
[3]
[4] != ready then
goto
check_dnode_ready_
1
if $data
(4)
[4] != ready then
goto
step
1
endi
$replica = 3
...
...
tests/script/tsim/sync/oneReplica1VgElect.sim
浏览文件 @
742fb1e5
...
...
@@ -11,55 +11,38 @@ system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start
system sh/exec.sh -n dnode4 -s start
$loop_cnt = 0
check_dnode_ready:
$loop_cnt = $loop_cnt + 1
sleep 200
if $loop_cnt == 10 then
print ====> dnode not ready!
return -1
endi
sql show dnodes
print ===> $rows $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $data[0][6]
print ===> $rows $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4] $data[1][5] $data[1][6]
print ===> $rows $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4] $data[2][5] $data[2][6]
print ===> $rows $data[3][0] $data[3][1] $data[3][2] $data[3][3] $data[3][4] $data[3][5] $data[3][6]
if $data[0][0] != 1 then
return -1
endi
if $data[0][4] != ready then
goto check_dnode_ready
endi
sql connect
sql create dnode $hostname port 7200
sql create dnode $hostname port 7300
sql create dnode $hostname port 7400
$
loop_cnt
= 0
check_dnode_ready_
1:
$loop_cnt = $loop_cnt
+ 1
sleep 2
00
if $loop_cnt
== 10 then
print ====> dnodes
not ready!
return -1
endi
$
x
= 0
step
1:
$x = $x
+ 1
sleep 10
00
if $x
== 10 then
print ====> dnode
not ready!
return -1
endi
sql show dnodes
print ===> $rows $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $data[0][6]
print ===> $rows $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4] $data[1][5] $data[1][6]
print ===> $rows $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4] $data[2][5] $data[2][6]
print ===> $rows $data[3][0] $data[3][1] $data[3][2] $data[3][3] $data[3][4] $data[3][5] $data[3][6]
if $data[0][4] != ready then
goto check_dnode_ready_1
print ===> $data00 $data01 $data02 $data03 $data04 $data05
print ===> $data10 $data11 $data12 $data13 $data14 $data15
print ===> $data20 $data21 $data22 $data23 $data24 $data25
print ===> $data30 $data31 $data32 $data33 $data34 $data35
if $rows != 4 then
return -1
endi
if $data(1)[4] != ready then
goto step1
endi
if $data
[1]
[4] != ready then
goto
check_dnode_ready_
1
if $data
(2)
[4] != ready then
goto
step
1
endi
if $data
[2]
[4] != ready then
goto
check_dnode_ready_
1
if $data
(3)
[4] != ready then
goto
step
1
endi
if $data
[3]
[4] != ready then
goto
check_dnode_ready_
1
if $data
(4)
[4] != ready then
goto
step
1
endi
$vgroups = 1
...
...
tests/script/tsim/sync/oneReplica1VgElectWithInsert.sim
浏览文件 @
742fb1e5
...
...
@@ -11,55 +11,38 @@ system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start
system sh/exec.sh -n dnode4 -s start
$loop_cnt = 0
check_dnode_ready:
$loop_cnt = $loop_cnt + 1
sleep 200
if $loop_cnt == 10 then
print ====> dnode not ready!
return -1
endi
sql show dnodes
print ===> $rows $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $data[0][6]
print ===> $rows $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4] $data[1][5] $data[1][6]
print ===> $rows $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4] $data[2][5] $data[2][6]
print ===> $rows $data[3][0] $data[3][1] $data[3][2] $data[3][3] $data[3][4] $data[3][5] $data[3][6]
if $data[0][0] != 1 then
return -1
endi
if $data[0][4] != ready then
goto check_dnode_ready
endi
sql connect
sql create dnode $hostname port 7200
sql create dnode $hostname port 7300
sql create dnode $hostname port 7400
$
loop_cnt
= 0
check_dnode_ready_
1:
$loop_cnt = $loop_cnt
+ 1
sleep 2
00
if $loop_cnt
== 10 then
print ====> dnodes
not ready!
return -1
endi
$
x
= 0
step
1:
$x = $x
+ 1
sleep 10
00
if $x
== 10 then
print ====> dnode
not ready!
return -1
endi
sql show dnodes
print ===> $rows $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $data[0][6]
print ===> $rows $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4] $data[1][5] $data[1][6]
print ===> $rows $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4] $data[2][5] $data[2][6]
print ===> $rows $data[3][0] $data[3][1] $data[3][2] $data[3][3] $data[3][4] $data[3][5] $data[3][6]
if $data[0][4] != ready then
goto check_dnode_ready_1
print ===> $data00 $data01 $data02 $data03 $data04 $data05
print ===> $data10 $data11 $data12 $data13 $data14 $data15
print ===> $data20 $data21 $data22 $data23 $data24 $data25
print ===> $data30 $data31 $data32 $data33 $data34 $data35
if $rows != 4 then
return -1
endi
if $data(1)[4] != ready then
goto step1
endi
if $data
[1]
[4] != ready then
goto
check_dnode_ready_
1
if $data
(2)
[4] != ready then
goto
step
1
endi
if $data
[2]
[4] != ready then
goto
check_dnode_ready_
1
if $data
(3)
[4] != ready then
goto
step
1
endi
if $data
[3]
[4] != ready then
goto
check_dnode_ready_
1
if $data
(4)
[4] != ready then
goto
step
1
endi
$vgroups = 1
...
...
tests/script/tsim/sync/oneReplica5VgElect.sim
浏览文件 @
742fb1e5
...
...
@@ -11,55 +11,38 @@ system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start
system sh/exec.sh -n dnode4 -s start
$loop_cnt = 0
check_dnode_ready:
$loop_cnt = $loop_cnt + 1
sleep 200
if $loop_cnt == 10 then
print ====> dnode not ready!
return -1
endi
sql show dnodes
print ===> $rows $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $data[0][6]
print ===> $rows $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4] $data[1][5] $data[1][6]
print ===> $rows $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4] $data[2][5] $data[2][6]
print ===> $rows $data[3][0] $data[3][1] $data[3][2] $data[3][3] $data[3][4] $data[3][5] $data[3][6]
if $data[0][0] != 1 then
return -1
endi
if $data[0][4] != ready then
goto check_dnode_ready
endi
sql connect
sql create dnode $hostname port 7200
sql create dnode $hostname port 7300
sql create dnode $hostname port 7400
$
loop_cnt
= 0
check_dnode_ready_
1:
$loop_cnt = $loop_cnt
+ 1
sleep 2
00
if $loop_cnt
== 10 then
print ====> dnodes
not ready!
return -1
endi
$
x
= 0
step
1:
$x = $x
+ 1
sleep 10
00
if $x
== 10 then
print ====> dnode
not ready!
return -1
endi
sql show dnodes
print ===> $
rows $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $data[0][6]
print ===> $
rows $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4] $data[1][5] $data[1][6]
print ===> $
rows $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4] $data[2][5] $data[2][6]
print ===> $
rows $data[3][0] $data[3][1] $data[3][2] $data[3][3] $data[3][4] $data[3][5] $data[3][6]
if $
data[0][4] != ready
then
goto check_dnode_ready_
1
print ===> $
data00 $data01 $data02 $data03 $data04 $data05
print ===> $
data10 $data11 $data12 $data13 $data14 $data15
print ===> $
data20 $data21 $data22 $data23 $data24 $data25
print ===> $
data30 $data31 $data32 $data33 $data34 $data35
if $
rows != 4
then
return -
1
endi
if $data
[1]
[4] != ready then
goto
check_dnode_ready_
1
if $data
(1)
[4] != ready then
goto
step
1
endi
if $data
[2]
[4] != ready then
goto
check_dnode_ready_
1
if $data
(2)
[4] != ready then
goto
step
1
endi
if $data[3][4] != ready then
goto check_dnode_ready_1
if $data(3)[4] != ready then
goto step1
endi
if $data(4)[4] != ready then
goto step1
endi
$replica = 1
...
...
tests/script/tsim/sync/threeReplica1VgElect.sim
浏览文件 @
742fb1e5
...
...
@@ -11,55 +11,38 @@ system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start
system sh/exec.sh -n dnode4 -s start
$loop_cnt = 0
check_dnode_ready:
$loop_cnt = $loop_cnt + 1
sleep 200
if $loop_cnt == 10 then
sql connect
sql create dnode $hostname port 7200
sql create dnode $hostname port 7300
sql create dnode $hostname port 7400
$x = 0
step1:
$x = $x + 1
sleep 1000
if $x == 10 then
print ====> dnode not ready!
return -1
endi
sql show dnodes
print ===> $
rows $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $data[0][6]
print ===> $
rows $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4] $data[1][5] $data[1][6]
print ===> $
rows $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4] $data[2][5] $data[2][6]
print ===> $
rows $data[3][0] $data[3][1] $data[3][2] $data[3][3] $data[3][4] $data[3][5] $data[3][6]
if $
data[0][0] != 1
then
print ===> $
data00 $data01 $data02 $data03 $data04 $data05
print ===> $
data10 $data11 $data12 $data13 $data14 $data15
print ===> $
data20 $data21 $data22 $data23 $data24 $data25
print ===> $
data30 $data31 $data32 $data33 $data34 $data35
if $
rows != 4
then
return -1
endi
if $data[0][4] != ready then
goto check_dnode_ready
endi
#sql connect
sql create dnode $hostname port 7200
sql create dnode $hostname port 7300
sql create dnode $hostname port 7400
$loop_cnt = 0
check_dnode_ready_1:
$loop_cnt = $loop_cnt + 1
sleep 200
if $loop_cnt == 10 then
print ====> dnodes not ready!
return -1
endi
sql show dnodes
print ===> $rows $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $data[0][6]
print ===> $rows $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4] $data[1][5] $data[1][6]
print ===> $rows $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4] $data[2][5] $data[2][6]
print ===> $rows $data[3][0] $data[3][1] $data[3][2] $data[3][3] $data[3][4] $data[3][5] $data[3][6]
if $data[0][4] != ready then
goto check_dnode_ready_1
if $data(1)[4] != ready then
goto step1
endi
if $data
[1]
[4] != ready then
goto
check_dnode_ready_
1
if $data
(2)
[4] != ready then
goto
step
1
endi
if $data
[2]
[4] != ready then
goto
check_dnode_ready_
1
if $data
(3)
[4] != ready then
goto
step
1
endi
if $data
[3]
[4] != ready then
goto
check_dnode_ready_
1
if $data
(4)
[4] != ready then
goto
step
1
endi
$vgroups = 1
...
...
tests/script/tsim/sync/threeReplica1VgElectWihtInsert.sim
浏览文件 @
742fb1e5
...
...
@@ -11,55 +11,38 @@ system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start
system sh/exec.sh -n dnode4 -s start
$loop_cnt = 0
check_dnode_ready:
$loop_cnt = $loop_cnt + 1
sleep 200
if $loop_cnt == 10 then
print ====> dnode not ready!
return -1
endi
sql show dnodes
print ===> $rows $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $data[0][6]
print ===> $rows $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4] $data[1][5] $data[1][6]
print ===> $rows $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4] $data[2][5] $data[2][6]
print ===> $rows $data[3][0] $data[3][1] $data[3][2] $data[3][3] $data[3][4] $data[3][5] $data[3][6]
if $data[0][0] != 1 then
return -1
endi
if $data[0][4] != ready then
goto check_dnode_ready
endi
sql connect
sql create dnode $hostname port 7200
sql create dnode $hostname port 7300
sql create dnode $hostname port 7400
$
loop_cnt
= 0
check_dnode_ready_
1:
$loop_cnt = $loop_cnt
+ 1
sleep 2
00
if $loop_cnt
== 10 then
print ====> dnodes
not ready!
return -1
endi
$
x
= 0
step
1:
$x = $x
+ 1
sleep 10
00
if $x
== 10 then
print ====> dnode
not ready!
return -1
endi
sql show dnodes
print ===> $rows $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $data[0][6]
print ===> $rows $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4] $data[1][5] $data[1][6]
print ===> $rows $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4] $data[2][5] $data[2][6]
print ===> $rows $data[3][0] $data[3][1] $data[3][2] $data[3][3] $data[3][4] $data[3][5] $data[3][6]
if $data[0][4] != ready then
goto check_dnode_ready_1
print ===> $data00 $data01 $data02 $data03 $data04 $data05
print ===> $data10 $data11 $data12 $data13 $data14 $data15
print ===> $data20 $data21 $data22 $data23 $data24 $data25
print ===> $data30 $data31 $data32 $data33 $data34 $data35
if $rows != 4 then
return -1
endi
if $data(1)[4] != ready then
goto step1
endi
if $data
[1]
[4] != ready then
goto
check_dnode_ready_
1
if $data
(2)
[4] != ready then
goto
step
1
endi
if $data
[2]
[4] != ready then
goto
check_dnode_ready_
1
if $data
(3)
[4] != ready then
goto
step
1
endi
if $data
[3]
[4] != ready then
goto
check_dnode_ready_
1
if $data
(4)
[4] != ready then
goto
step
1
endi
$vgroups = 1
...
...
tests/script/tsim/sync/vnodesnapshot-test.sim
浏览文件 @
742fb1e5
...
...
@@ -11,55 +11,38 @@ system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start
system sh/exec.sh -n dnode4 -s start
$loop_cnt = 0
check_dnode_ready:
$loop_cnt = $loop_cnt + 1
sleep 200
if $loop_cnt == 10 then
print ====> dnode not ready!
return -1
endi
sql show dnodes
print ===> $rows $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $data[0][6]
print ===> $rows $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4] $data[1][5] $data[1][6]
print ===> $rows $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4] $data[2][5] $data[2][6]
print ===> $rows $data[3][0] $data[3][1] $data[3][2] $data[3][3] $data[3][4] $data[3][5] $data[3][6]
if $data[0][0] != 1 then
return -1
endi
if $data[0][4] != ready then
goto check_dnode_ready
endi
sql connect
sql create dnode $hostname port 7200
sql create dnode $hostname port 7300
sql create dnode $hostname port 7400
$
loop_cnt
= 0
check_dnode_ready_
1:
$loop_cnt = $loop_cnt
+ 1
sleep 2
00
if $loop_cnt
== 10 then
print ====> dnodes
not ready!
return -1
endi
$
x
= 0
step
1:
$x = $x
+ 1
sleep 10
00
if $x
== 10 then
print ====> dnode
not ready!
return -1
endi
sql show dnodes
print ===> $rows $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $data[0][6]
print ===> $rows $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4] $data[1][5] $data[1][6]
print ===> $rows $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4] $data[2][5] $data[2][6]
print ===> $rows $data[3][0] $data[3][1] $data[3][2] $data[3][3] $data[3][4] $data[3][5] $data[3][6]
if $data[0][4] != ready then
goto check_dnode_ready_1
print ===> $data00 $data01 $data02 $data03 $data04 $data05
print ===> $data10 $data11 $data12 $data13 $data14 $data15
print ===> $data20 $data21 $data22 $data23 $data24 $data25
print ===> $data30 $data31 $data32 $data33 $data34 $data35
if $rows != 4 then
return -1
endi
if $data(1)[4] != ready then
goto step1
endi
if $data
[1]
[4] != ready then
goto
check_dnode_ready_
1
if $data
(2)
[4] != ready then
goto
step
1
endi
if $data
[2]
[4] != ready then
goto
check_dnode_ready_
1
if $data
(3)
[4] != ready then
goto
step
1
endi
if $data
[3]
[4] != ready then
goto
check_dnode_ready_
1
if $data
(4)
[4] != ready then
goto
step
1
endi
$replica = 3
...
...
tests/script/tsim/sync/vnodesnapshot.sim
浏览文件 @
742fb1e5
...
...
@@ -11,55 +11,38 @@ system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start
system sh/exec.sh -n dnode4 -s start
$loop_cnt = 0
check_dnode_ready:
$loop_cnt = $loop_cnt + 1
sleep 200
if $loop_cnt == 10 then
print ====> dnode not ready!
return -1
endi
sql show dnodes
print ===> $rows $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $data[0][6]
print ===> $rows $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4] $data[1][5] $data[1][6]
print ===> $rows $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4] $data[2][5] $data[2][6]
print ===> $rows $data[3][0] $data[3][1] $data[3][2] $data[3][3] $data[3][4] $data[3][5] $data[3][6]
if $data[0][0] != 1 then
return -1
endi
if $data[0][4] != ready then
goto check_dnode_ready
endi
sql connect
sql create dnode $hostname port 7200
sql create dnode $hostname port 7300
sql create dnode $hostname port 7400
$
loop_cnt
= 0
check_dnode_ready_
1:
$loop_cnt = $loop_cnt
+ 1
sleep 2
00
if $loop_cnt
== 10 then
print ====> dnodes
not ready!
return -1
endi
$
x
= 0
step
1:
$x = $x
+ 1
sleep 10
00
if $x
== 10 then
print ====> dnode
not ready!
return -1
endi
sql show dnodes
print ===> $rows $data[0][0] $data[0][1] $data[0][2] $data[0][3] $data[0][4] $data[0][5] $data[0][6]
print ===> $rows $data[1][0] $data[1][1] $data[1][2] $data[1][3] $data[1][4] $data[1][5] $data[1][6]
print ===> $rows $data[2][0] $data[2][1] $data[2][2] $data[2][3] $data[2][4] $data[2][5] $data[2][6]
print ===> $rows $data[3][0] $data[3][1] $data[3][2] $data[3][3] $data[3][4] $data[3][5] $data[3][6]
if $data[0][4] != ready then
goto check_dnode_ready_1
print ===> $data00 $data01 $data02 $data03 $data04 $data05
print ===> $data10 $data11 $data12 $data13 $data14 $data15
print ===> $data20 $data21 $data22 $data23 $data24 $data25
print ===> $data30 $data31 $data32 $data33 $data34 $data35
if $rows != 4 then
return -1
endi
if $data(1)[4] != ready then
goto step1
endi
if $data
[1]
[4] != ready then
goto
check_dnode_ready_
1
if $data
(2)
[4] != ready then
goto
step
1
endi
if $data
[2]
[4] != ready then
goto
check_dnode_ready_
1
if $data
(3)
[4] != ready then
goto
step
1
endi
if $data
[3]
[4] != ready then
goto
check_dnode_ready_
1
if $data
(4)
[4] != ready then
goto
step
1
endi
$replica = 3
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录