Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
fad492b7
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看板
未验证
提交
fad492b7
编写于
6月 28, 2022
作者:
S
Shengliang Guan
提交者:
GitHub
6月 28, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #14335 from taosdata/fix/dnode
test: case for stable
上级
aaad925d
50729272
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
172 addition
and
225 deletion
+172
-225
tests/script/jenkins/basic.txt
tests/script/jenkins/basic.txt
+4
-4
tests/script/tsim/dnode/drop_dnode_has_multi_vnode_replica1.sim
...script/tsim/dnode/drop_dnode_has_multi_vnode_replica1.sim
+2
-0
tests/script/tsim/vnode/stable_balance_replica1.sim
tests/script/tsim/vnode/stable_balance_replica1.sim
+38
-46
tests/script/tsim/vnode/stable_dnode3.sim
tests/script/tsim/vnode/stable_dnode3.sim
+35
-62
tests/script/tsim/vnode/stable_replica3_dnode6.sim
tests/script/tsim/vnode/stable_replica3_dnode6.sim
+49
-63
tests/script/tsim/vnode/stable_replica3_vnode3.sim
tests/script/tsim/vnode/stable_replica3_vnode3.sim
+44
-50
未找到文件。
tests/script/jenkins/basic.txt
浏览文件 @
fad492b7
...
...
@@ -171,12 +171,12 @@
./test.sh -f tsim/vnode/replica3_vgroup.sim
#./test.sh -f tsim/vnode/replica3_many.sim
#./test.sh -f tsim/vnode/replica3_import.sim
#
./test.sh -f tsim/vnode/stable_balance_replica1.sim
./test.sh -f tsim/vnode/stable_balance_replica1.sim
./test.sh -f tsim/vnode/stable_dnode2_stop.sim
./test.sh -f tsim/vnode/stable_dnode2.sim
#
./test.sh -f tsim/vnode/stable_dnode3.sim
#
./test.sh -f tsim/vnode/stable_replica3_dnode6.sim
#
./test.sh -f tsim/vnode/stable_replica3_vnode3.sim
./test.sh -f tsim/vnode/stable_dnode3.sim
./test.sh -f tsim/vnode/stable_replica3_dnode6.sim
./test.sh -f tsim/vnode/stable_replica3_vnode3.sim
# --- sync
./test.sh -f tsim/sync/3Replica1VgElect.sim
...
...
tests/script/tsim/dnode/drop_dnode_has_multi_vnode_replica1.sim
浏览文件 @
fad492b7
...
...
@@ -124,6 +124,8 @@ if $data(5)[3] != 3 then
return -1
endi
#sql reset query cache
print =============== step4: select data
sql show d1.tables
if $rows != 1 then
...
...
tests/script/tsim/vnode/stable_balance_replica1.sim
浏览文件 @
fad492b7
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 2
system sh/cfg.sh -n dnode1 -c statusInterval -v 1
system sh/cfg.sh -n dnode2 -c statusInterval -v 1
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 dnode1 -c walLevel -v 2
system sh/cfg.sh -n dnode2 -c walLevel -v 2
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 dnode1 -c maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode2 -c maxtablesPerVnode -v 4
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 4
system sh/cfg.sh -n dnode2 -c supportVnodes -v 4
system sh/cfg.sh -n dnode3 -c supportVnodes -v 4
system sh/cfg.sh -n dnode4 -c supportVnodes -v 4
$dbPrefix = br1_db
$tbPrefix = br1_tb
...
...
@@ -29,7 +25,7 @@ $db = $dbPrefix
$mt = $mtPrefix
$st = $stPrefix . $i
sql create database $db
sql create database $db
vgroups 4
sql use $db
sql create table $mt (ts timestamp, tbcol int, tbcol2 float) TAGS(tgcol int)
...
...
@@ -54,51 +50,47 @@ endw
sleep 100
print =============== step2
$x = 0
show1:
$x = $x + 1
sleep 2000
if $x == 10 then
return -1
endi
sql show dnodes -x show1
$dnode1Vnodes = $data2_1
print dnode1 $dnode1Vnodes
$dnode2Vnodes = $data2_2
print dnode2 $dnode2Vnodes
if $dnode1Vnodes != 4 then
goto show1
endi
if $dnode2Vnodes != null then
goto show1
sql show dnodes
print dnode1 openVnodes $data(1)[2]
if $data(1)[2] != 4 then
return -1
endi
print =============== step3 start dnode2
sql create dnode $hostname
2
sql create dnode $hostname
port 7200
system sh/exec.sh -n dnode2 -s start
sleep 8000
$x = 0
s
how2:
s
tep3:
$x = $x + 1
sleep 2000
if $x == 10 then
return -1
sleep 1000
if $x == 10 then
print ====> dnode not ready!
return -1
endi
sql show dnodes -x show2
$dnode1Vnodes = $data2_1
print dnode1 $dnode1Vnodes
$dnode2Vnodes = $data2_2
print dnode2 $dnode2Vnodes
if $dnode1Vnodes != 2 then
goto show2
sql show dnodes
print ===> $data00 $data01 $data02 $data03 $data04 $data05
print ===> $data10 $data11 $data12 $data13 $data14 $data15
if $rows != 2 then
return -1
endi
if $dnode2Vnodes != 2 then
goto show2
if $data(1)[4] != ready then
goto step3
endi
if $data(2)[4] != ready then
goto step3
endi
sql balance vgroup
sql show dnodes
print dnode1 openVnodes $data(1)[2]
print dnode2 openVnodes $data(2)[2]
if $data(1)[2] != 2 then
return -1
endi
if $data(2)[2] != 2 then
return -1
endi
print =============== step4
$i = 1
...
...
tests/script/tsim/vnode/stable_dnode3.sim
浏览文件 @
fad492b7
...
...
@@ -2,39 +2,46 @@ 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 walLevel -v 1
system sh/cfg.sh -n dnode2 -c walLevel -v 1
system sh/cfg.sh -n dnode3 -c walLevel -v 1
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode2 -c maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode3 -c maxtablesPerVnode -v 4
system sh/exec.sh -n dnode1 -s start
system sh/deploy.sh -n dnode4 -i 4
system sh/cfg.sh -n dnode1 -c supportVnodes -v 4
system sh/cfg.sh -n dnode2 -c supportVnodes -v 4
system sh/cfg.sh -n dnode3 -c supportVnodes -v 4
system sh/cfg.sh -n dnode4 -c supportVnodes -v 4
print ========== step1
system sh/exec.sh -n dnode1 -s start
sql connect
sql create dnode $hostname
2
sql create dnode $hostname
3
sql create dnode $hostname
port 7200
sql create dnode $hostname
port 7300
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start
$x = 0
createDnode:
step1:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
if $x == 10 then
print ====> dnode not ready!
return -1
endi
sql show dnodes;
if $data4_2 == offline then
goto createDnode
endi
if $data4_3 == offline then
goto createDnode
endi
sql show dnodes
print ===> $data00 $data01 $data02 $data03 $data04 $data05
print ===> $data10 $data11 $data12 $data13 $data14 $data15
if $rows != 3 then
return -1
endi
if $data(1)[4] != ready then
goto step1
endi
if $data(2)[4] != ready then
goto step1
endi
if $data(3)[4] != ready then
goto step1
endi
print ======================== dnode1 start
$dbPrefix = d3_db
$tbPrefix = d3_tb
$mtPrefix = d3_mt
...
...
@@ -47,7 +54,7 @@ $i = 0
$db = $dbPrefix . $i
$mt = $mtPrefix . $i
sql create database $db
sql create database $db
vgroups 3
sql use $db
sql create table $mt (ts timestamp, tbcol int) TAGS(tgcol int)
...
...
@@ -73,26 +80,6 @@ if $rows != 3 then
return -1
endi
sql show dnodes
$dnode1Vnodes = $data2_1
print dnode1 $dnode1Vnodes
$dnode2Vnodes = $data2_2
print dnode2 $dnode2Vnodes
$dnode3Vnodes = $data2_3
print dnode3 $dnode3Vnodes
if $dnode1Vnodes != 1 then
return -1
endi
if $dnode2Vnodes != 1 then
return -1
endi
if $dnode3Vnodes != 1 then
return -1
endi
sleep 100
print =============== step2
$i = 1
$tb = $tbPrefix . $i
...
...
@@ -124,20 +111,20 @@ if $data00 != $rowNum then
endi
print =============== step5
sql select count(tbcol) as b from $tb interval(1m)
sql select
_wstartts,
count(tbcol) as b from $tb interval(1m)
print ===> $data01
if $data01 != 1 then
return -1
endi
sql select count(tbcol) as b from $tb interval(1d)
sql select
_wstartts,
count(tbcol) as b from $tb interval(1d)
print ===> $data01
if $data01 != $rowNum then
return -1
endi
print =============== step6
sql select count(tbcol) as b from $tb where ts <= 1519833840000 interval(1m)
sql select
_wstartts,
count(tbcol) as b from $tb where ts <= 1519833840000 interval(1m)
print ===> $data01
if $data01 != 1 then
return -1
...
...
@@ -179,13 +166,13 @@ if $data00 != 25 then
endi
print =============== step9
sql select count(tbcol) as b from $mt interval(1m)
sql select
_wstartts,
count(tbcol) as b from $mt interval(1m)
print ===> $data01
if $data01 != 10 then
return -1
endi
sql select count(tbcol) as b from $mt interval(1d)
sql select
_wstartts,
count(tbcol) as b from $mt interval(1d)
print ===> $data01
if $data01 != 200 then
return -1
...
...
@@ -202,20 +189,10 @@ if $rows != $tbNum then
return -1
endi
print =============== step11
sql select count(tbcol) as b from $mt where ts <= 1519833840000 interval(1m) group by tgcol
print ===> $data01
if $data01 != 1 then
return -1
endi
if $rows != 50 then
return -1
endi
print =============== clear
sql drop database $db
sql show databases
if $rows !=
0
then
if $rows !=
2
then
return -1
endi
...
...
@@ -223,7 +200,3 @@ 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
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/tsim/vnode/stable_replica3_dnode6.sim
浏览文件 @
fad492b7
...
...
@@ -5,29 +5,22 @@ system sh/deploy.sh -n dnode3 -i 3
system sh/deploy.sh -n dnode4 -i 4
system sh/deploy.sh -n dnode5 -i 5
system sh/deploy.sh -n dnode6 -i 6
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 dnode5 -c walLevel -v 2
system sh/cfg.sh -n dnode6 -c walLevel -v 2
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode2 -c maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode3 -c maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode4 -c maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode5 -c maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode6 -c maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode1 -c supportVnodes -v 4
system sh/cfg.sh -n dnode2 -c supportVnodes -v 4
system sh/cfg.sh -n dnode3 -c supportVnodes -v 4
system sh/cfg.sh -n dnode4 -c supportVnodes -v 4
system sh/cfg.sh -n dnode5 -c supportVnodes -v 4
system sh/cfg.sh -n dnode6 -c supportVnodes -v 4
print ========== step1
system sh/exec.sh -n dnode1 -s start
sql connect
sql create dnode $hostname
2
sql create dnode $hostname
3
sql create dnode $hostname
4
sql create dnode $hostname
5
sql create dnode $hostname
6
sql create dnode $hostname
port 7200
sql create dnode $hostname
port 7300
sql create dnode $hostname
port 7400
sql create dnode $hostname
port 7500
sql create dnode $hostname
port 7600
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start
system sh/exec.sh -n dnode4 -s start
...
...
@@ -35,31 +28,41 @@ system sh/exec.sh -n dnode5 -s start
system sh/exec.sh -n dnode6 -s start
$x = 0
createDnode:
step10:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
if $x == 10 then
print ====> dnode not ready!
return -1
endi
sql show dnodes;
if $data4_2 == offline then
goto createDnode
endi
if $data4_3 == offline then
goto createDnode
endi
if $data4_4 == offline then
goto createDnode
endi
if $data4_5 == offline then
goto createDnode
endi
if $data4_6 == offline then
goto createDnode
endi
sql show dnodes
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 != 6 then
return -1
endi
if $data(1)[4] != ready then
goto step10
endi
if $data(2)[4] != ready then
goto step10
endi
if $data(3)[4] != ready then
goto step10
endi
if $data(4)[4] != ready then
goto step10
endi
if $data(5)[4] != ready then
goto step10
endi
if $data(6)[4] != ready then
goto step10
endi
print ======================== dnode1 start
$dbPrefix = r3d6_db
$tbPrefix = r3d6_tb
$mtPrefix = r3d6_mt
...
...
@@ -78,7 +81,7 @@ $i = 0
$db = $dbPrefix . $i
$mt = $mtPrefix . $i
sql create database $db replica 3
sql create database $db replica 3
vgroups 3
sql use $db
sql create table $mt (ts timestamp, tbcol int) TAGS(tgcol int)
...
...
@@ -137,20 +140,20 @@ if $data00 != $rowNum then
endi
print =============== step5
sql select count(tbcol) as b from $tb interval(1m)
sql select
_wstartts,
count(tbcol) as b from $tb interval(1m)
print ===> $data01
if $data01 != 1 then
return -1
endi
sql select count(tbcol) as b from $tb interval(1d)
sql select
_wstartts,
count(tbcol) as b from $tb interval(1d)
print ===> $data01
if $data01 != $rowNum then
return -1
endi
print =============== step6
sql select count(tbcol) as b from $tb where ts <= 1519833840000 interval(1m)
sql select
_wstartts,
count(tbcol) as b from $tb where ts <= 1519833840000 interval(1m)
print ===> $data01
if $data01 != 1 then
return -1
...
...
@@ -192,13 +195,13 @@ if $data00 != 25 then
endi
print =============== step9
#sql select count(tbcol) as b from $mt interval(1m)
#sql select
_wstartts,
count(tbcol) as b from $mt interval(1m)
#print ===> $data01
#if $data01 != 10 then
# return -1
#endi
sql select count(tbcol) as b from $mt interval(1d)
sql select
_wstartts,
count(tbcol) as b from $mt interval(1d)
print ===> $data01
if $data01 != 200 then
return -1
...
...
@@ -215,23 +218,6 @@ if $rows != $tbNum then
return -1
endi
print =============== step11
sql select count(tbcol) as b from $mt where ts <= 1519833840000 interval(1m) group by tgcol
print ===> $data01
if $data01 != 1 then
return -1
endi
if $rows != 50 then
return -1
endi
return
print =============== clear
sql drop database $db
sql show databases
if $rows != 0 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
...
...
tests/script/tsim/vnode/stable_replica3_vnode3.sim
浏览文件 @
fad492b7
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 maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode2 -c maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode3 -c maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode4 -c maxtablesPerVnode -v 4
system sh/deploy.sh -n dnode5 -i 5
system sh/deploy.sh -n dnode6 -i 6
system sh/cfg.sh -n dnode1 -c supportVnodes -v 4
system sh/cfg.sh -n dnode2 -c supportVnodes -v 4
system sh/cfg.sh -n dnode3 -c supportVnodes -v 4
system sh/cfg.sh -n dnode4 -c supportVnodes -v 4
system sh/cfg.sh -n dnode5 -c supportVnodes -v 4
system sh/cfg.sh -n dnode6 -c supportVnodes -v 4
print ========== step1
system sh/exec.sh -n dnode1 -s start
sql connect
sql create dnode $hostname
2
sql create dnode $hostname
3
sql create dnode $hostname
4
sql create dnode $hostname
port 7200
sql create dnode $hostname
port 7300
sql create dnode $hostname
port 7400
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start
system sh/exec.sh -n dnode4 -s start
$x = 0
createDnode:
step10:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
if $x == 10 then
print ====> dnode not ready!
return -1
endi
sql show dnodes;
if $data4_2 == offline then
goto createDnode
endi
if $data4_3 == offline then
goto createDnode
endi
if $data4_4 == offline then
goto createDnode
endi
sql show dnodes
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 step10
endi
if $data(2)[4] != ready then
goto step10
endi
if $data(3)[4] != ready then
goto step10
endi
if $data(4)[4] != ready then
goto step10
endi
print ======================== dnode1 start
$dbPrefix = r3v3_db
$tbPrefix = r3v3_tb
$mtPrefix = r3v3_mt
...
...
@@ -54,7 +65,7 @@ $i = 0
$db = $dbPrefix . $i
$mt = $mtPrefix . $i
sql create database $db replica 3
sql create database $db replica 3
vgroups 3
sql use $db
sql create table $mt (ts timestamp, tbcol int) TAGS(tgcol int)
...
...
@@ -113,20 +124,20 @@ if $data00 != $rowNum then
endi
print =============== step5
sql select count(tbcol) as b from $tb interval(1m)
sql select
_wstartts,
count(tbcol) as b from $tb interval(1m)
print ===> $data01
if $data01 != 1 then
return -1
endi
sql select count(tbcol) as b from $tb interval(1d)
sql select
_wstartts,
count(tbcol) as b from $tb interval(1d)
print ===> $data01
if $data01 != $rowNum then
return -1
endi
print =============== step6
sql select count(tbcol) as b from $tb where ts <= 1519833840000 interval(1m)
sql select
_wstartts,
count(tbcol) as b from $tb where ts <= 1519833840000 interval(1m)
print ===> $data01
if $data01 != 1 then
return -1
...
...
@@ -169,13 +180,13 @@ if $data00 != 25 then
endi
print =============== step9
sql select count(tbcol) as b from $mt interval(1m)
sql select
_wstartts,
count(tbcol) as b from $mt interval(1m)
print ===> $data01
if $data01 != 10 then
return -1
endi
sql select count(tbcol) as b from $mt interval(1d)
sql select
_wstartts,
count(tbcol) as b from $mt interval(1d)
print ===> $data01
if $data01 != 200 then
return -1
...
...
@@ -192,23 +203,6 @@ if $rows != $tbNum then
return -1
endi
print =============== step11
sql select count(tbcol) as b from $mt where ts <= 1519833840000 interval(1m) group by tgcol
print ===> $data01
if $data01 != 1 then
return -1
endi
if $rows != 50 then
return -1
endi
print =============== clear
sql drop database $db
sql show databases
if $rows != 0 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
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录