Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
cdb35a08
T
TDengine
项目概览
taosdata
/
TDengine
大约 1 年 前同步成功
通知
1181
Star
22014
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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
cdb35a08
编写于
7月 20, 2022
作者:
S
Shengliang Guan
提交者:
GitHub
7月 20, 2022
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #15183 from taosdata/fix/mnode
test: restore 2.0 case
上级
e13c90c5
be56f8b1
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
56 addition
and
127 deletion
+56
-127
tests/script/jenkins/basic.txt
tests/script/jenkins/basic.txt
+3
-3
tests/script/tsim/db/commit.sim
tests/script/tsim/db/commit.sim
+24
-26
tests/script/tsim/db/keep.sim
tests/script/tsim/db/keep.sim
+29
-98
未找到文件。
tests/script/jenkins/basic.txt
浏览文件 @
cdb35a08
...
...
@@ -17,7 +17,7 @@
./test.sh -f tsim/db/basic4.sim
./test.sh -f tsim/db/basic5.sim
./test.sh -f tsim/db/basic6.sim
# nojira
./test.sh -f tsim/db/commit.sim
./test.sh -f tsim/db/commit.sim
./test.sh -f tsim/db/create_all_options.sim
./test.sh -f tsim/db/delete_reuse1.sim
./test.sh -f tsim/db/delete_reuse2.sim
...
...
@@ -27,7 +27,7 @@
./test.sh -f tsim/db/delete_writing2.sim
# unsupport ./test.sh -f tsim/db/dropdnodes.sim
./test.sh -f tsim/db/error1.sim
#
no
jira ./test.sh -f tsim/db/keep.sim
# jira ./test.sh -f tsim/db/keep.sim
./test.sh -f tsim/db/len.sim
./test.sh -f tsim/db/repeat.sim
./test.sh -f tsim/db/show_create_db.sim
...
...
@@ -88,7 +88,7 @@
./test.sh -f tsim/parser/alter__for_community_version.sim
./test.sh -f tsim/parser/alter_column.sim
./test.sh -f tsim/parser/alter_stable.sim
#
no
jira ./test.sh -f tsim/parser/auto_create_tb.sim
# jira ./test.sh -f tsim/parser/auto_create_tb.sim
./test.sh -f tsim/parser/auto_create_tb_drop_tb.sim
./test.sh -f tsim/parser/between_and.sim
./test.sh -f tsim/parser/binary_escapeCharacter.sim
...
...
tests/script/tsim/db/commit.sim
浏览文件 @
cdb35a08
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 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 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 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 ========= start dnode1 as master
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode2 -s start
sql connect
sleep 2000
print ========= start other dnodes
sql create dnode $hostname2
system sh/exec.sh -n dnode2 -s start
sleep 2000
sql create dnode $hostname port 7200
$x = 0
step1:
$ = $x + 1
sleep 1000
if $x == 10 then
print ====> dnode not ready!
return -1
endi
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 $data(1)[4] != ready then
goto step1
endi
if $data(2)[4] != ready then
goto step1
endi
print ======== step1 create db
sql create database commitdb replica 1 duration 7 keep 30
...
...
@@ -68,9 +76,7 @@ $num = $rows + 2
print ======== step3 import old data
sql import into tb values (now - 10d , -10 )
sql import into tb values (now - 11d , -11 )
sql select * from tb order by ts desc
print ===> rows $rows expect $num
print ===> last $data01 expect $data01
...
...
@@ -99,9 +105,7 @@ endi
print ======== step5 stop dnode
system sh/exec.sh -n dnode2 -s stop -x SIGINT
sleep 3000
system sh/exec.sh -n dnode2 -s start
sleep 3000
sql select * from tb
print ===> rows $rows
...
...
@@ -116,10 +120,4 @@ if $data01 != 40 then
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
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
system sh/exec.sh -n dnode2 -s stop -x SIGINT
\ No newline at end of file
tests/script/tsim/db/keep.sim
浏览文件 @
cdb35a08
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 transPullupInterval -v 1
system sh/cfg.sh -n dnode2 -c transPullupInterval -v 1
system sh/cfg.sh -n dnode3 -c transPullupInterval -v 1
system sh/cfg.sh -n dnode4 -c transPullupInterval -v 1
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode2 -s start
sql connect
print =============== step1 create dnode2
sql create dnode $hostname port 7200
$x = 0
step1:
$x = $x + 1
sleep 1000
if $x == 10 then
print ====> dnode not ready!
return -1
endi
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 $data(1)[4] != ready then
goto step1
endi
if $data(2)[4] != ready then
goto step1
endi
print ======== step1 create db
sql create database keepdb replica 1 keep 30 duration 7
sql create database keepdb replica 1 keep 30 duration 7
vgroups 2
sql use keepdb
sql create table tb (ts timestamp, i int)
$x = 1
while $x < 41
$time = $x . d
sql insert into tb values (now
+
$time , $x ) -x step2
sql insert into tb values (now
-
$time , $x ) -x step2
step2:
$x = $x + 1
endw
sql select * from tb
print ===> rows $rows
print ===> last $data01
print ===> rows $rows last $data01
if $rows >= 40 then
return -1
endi
...
...
@@ -61,9 +27,7 @@ system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s start
sql select * from tb
print ===> rows $rows
print ===> last $data01
print ===> rows $rows last $data01
if $rows >= 40 then
return -1
endi
...
...
@@ -75,23 +39,13 @@ $num1 = $rows + 40
print ======== step3 alter db
sql alter database keepdb keep 60
flush database keepdb
sql flush database keepdb
sql show databases
print $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07
if $data
02 != 1
then
if $data
22 != 2
then
return -1
endi
if $data03 != 1 then
return -1
endi
if $data04 != 1 then
return -1
endi
if $data05 != 7 then
return -1
endi
if $data06 != 60 then
if $data27 != 86400m,86400m,86400m then
return -1
endi
...
...
@@ -99,98 +53,73 @@ print ======== step4 insert data
$x = 41
while $x < 81
$time = $x . d
sql insert into tb values (now + $time , $x )
sql insert into tb values (now - $time , $x ) -x step4
step4:
$x = $x + 1
endw
sql select * from tb
print ===> rows $rows
print ===> last $data01
if $rows != $num1 then
print ===> rows $rows last $data01
if $rows >= 80 then
return -1
endi
if $
data01 != 8
0 then
if $
rows <= 5
0 then
return -1
endi
return
print ======== step5 stop dnode
system sh/exec.sh -n dnode2 -s stop -x SIG
INT
system sh/exec.sh -n dnode2 -s stop -x SIG
KILL
system sh/exec.sh -n dnode2 -s start
sql select * from tb
print ===> rows $rows
print ===> last $data01
if $rows >= $num1 then
print ===> rows $rows last $data01
if $rows >= 80 then
return -1
endi
if $rows <= 50 then
return -1
endi
if $data01 != 80 then
return -1
endi
print ======== step6 alter db
sql alter database keepdb keep 30
sleep 1000
sql show databases
print $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07
if $data02 != 1 then
return -1
endi
if $data03 != 1 then
return -1
endi
if $data04 != 1 then
return -1
endi
if $data05 != 7 then
if $data22 != 2 then
return -1
endi
if $data
06 != 30
then
if $data
27 != 43200m,43200m,43200m
then
return -1
endi
print ======== step7 stop dnode
system sh/exec.sh -n dnode2 -s stop -x SIGINT
sleep 2000
system sh/exec.sh -n dnode2 -s stop -x SIGKILL
system sh/exec.sh -n dnode2 -s start
sleep 2000
sql select * from tb
print ===> rows $rows
print ===> last $data01
print ===> rows $rows last $data01
if $rows >= 40 then
return -1
endi
if $rows <= 20 then
return -1
endi
if $data01 != 80 then
return -1
endi
$num3 = $rows + 40
print ======== step8 insert data
$x = 81
while $x < 121
$time = $x . d
sql insert into tb values (now + $time , $x )
sql insert into tb values (now - $time , $x ) -x step4
step4:
$x = $x + 1
endw
sql select * from tb
print ===> rows $rows
print ===> last $data01
if $rows != $num3 then
print ===> rows $rows last $data01
if $rows >= 40 then
return -1
endi
if $
data01 != 1
20 then
if $
rows <=
20 then
return -1
endi
...
...
@@ -208,4 +137,6 @@ sql alter database keepdb duration 1 -x error3
error3:
print ======= test success
\ No newline at end of file
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录