Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
5b7a804c
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看板
提交
5b7a804c
编写于
12月 23, 2020
作者:
S
Shengliang Guan
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
TD-2529 scripts
上级
b340e374
变更
23
隐藏空白更改
内联
并排
Showing
23 changed file
with
817 addition
and
250 deletion
+817
-250
tests/script/general/db/alter_tables_d2.sim
tests/script/general/db/alter_tables_d2.sim
+98
-18
tests/script/general/db/alter_tables_v1.sim
tests/script/general/db/alter_tables_v1.sim
+91
-16
tests/script/general/db/alter_tables_v4.sim
tests/script/general/db/alter_tables_v4.sim
+78
-13
tests/script/general/db/delete_reusevnode.sim
tests/script/general/db/delete_reusevnode.sim
+0
-2
tests/script/general/db/delete_writing1.sim
tests/script/general/db/delete_writing1.sim
+0
-1
tests/script/general/table/delete_writing.sim
tests/script/general/table/delete_writing.sim
+0
-2
tests/script/general/wal/sync.sim
tests/script/general/wal/sync.sim
+30
-9
tests/script/unique/big/balance.sim
tests/script/unique/big/balance.sim
+33
-22
tests/script/unique/big/tcp.sim
tests/script/unique/big/tcp.sim
+2
-3
tests/script/unique/cluster/balance1.sim
tests/script/unique/cluster/balance1.sim
+48
-23
tests/script/unique/cluster/balance2.sim
tests/script/unique/cluster/balance2.sim
+47
-15
tests/script/unique/cluster/vgroup100.sim
tests/script/unique/cluster/vgroup100.sim
+0
-5
tests/script/unique/db/delete.sim
tests/script/unique/db/delete.sim
+0
-5
tests/script/unique/db/delete_part.sim
tests/script/unique/db/delete_part.sim
+34
-17
tests/script/unique/dnode/balance1.sim
tests/script/unique/dnode/balance1.sim
+7
-9
tests/script/unique/dnode/balance2.sim
tests/script/unique/dnode/balance2.sim
+30
-11
tests/script/unique/dnode/balance3.sim
tests/script/unique/dnode/balance3.sim
+36
-14
tests/script/unique/dnode/reason.sim
tests/script/unique/dnode/reason.sim
+74
-17
tests/script/unique/dnode/remove1.sim
tests/script/unique/dnode/remove1.sim
+26
-10
tests/script/unique/dnode/remove2.sim
tests/script/unique/dnode/remove2.sim
+30
-7
tests/script/unique/dnode/vnode_clean.sim
tests/script/unique/dnode/vnode_clean.sim
+12
-14
tests/script/unique/import/replica2.sim
tests/script/unique/import/replica2.sim
+78
-10
tests/script/unique/import/replica3.sim
tests/script/unique/import/replica3.sim
+63
-7
未找到文件。
tests/script/general/db/alter_tables_d2.sim
浏览文件 @
5b7a804c
...
...
@@ -11,11 +11,26 @@ system sh/cfg.sh -n dnode2 -c maxTablesPerVnode -v 5
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode2 -s start
sleep 3000
sql connect
sql create dnode $hostname2
sleep 1000
$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
print ============================ step1
...
...
@@ -80,10 +95,23 @@ system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/cfg.sh -n dnode1 -c maxTablesPerVnode -v 10
system sh/cfg.sh -n dnode2 -c maxTablesPerVnode -v 10
sleep 5000
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode2 -s start
sleep 5000
$x = 0
step2:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show mnodes -x step1
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
goto step2
endi
sql create table db.t100 using db.st tags(0)
sql create table db.t101 using db.st tags(1)
...
...
@@ -110,7 +138,6 @@ if $rows != 40 then
return -1
endi
sql insert into db.t100 values(now, 1)
sql insert into db.t101 values(now, 1)
sql insert into db.t102 values(now, 1)
...
...
@@ -144,10 +171,24 @@ system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/cfg.sh -n dnode1 -c maxTablesPerVnode -v 15
system sh/cfg.sh -n dnode2 -c maxTablesPerVnode -v 15
sleep 5000
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode2 -s start
sleep 5000
$x = 0
step3:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show mnodes -x step3
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
goto step3
endi
sql create table db.t200 using db.st tags(0)
sql create table db.t201 using db.st tags(1)
...
...
@@ -198,7 +239,7 @@ sql insert into db.t219 values(now, 1)
print ============================ step6
sql reset query cache
sleep 100
0
sleep 100
sql select * from db.t000
if $rows != 1 then
...
...
@@ -268,10 +309,23 @@ system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/cfg.sh -n dnode1 -c maxTablesPerVnode -v 20
system sh/cfg.sh -n dnode2 -c maxTablesPerVnode -v 20
sleep 5000
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode2 -s start
sleep 5000
$x = 0
step9:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show mnodes -x step9
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
goto step9
endi
sql create table db.t300 using db.st tags(0)
sql create table db.t301 using db.st tags(1)
...
...
@@ -321,7 +375,7 @@ if $rows != 80 then
endi
sql reset query cache
sleep 100
0
sleep 100
sql select * from db.t000
if $rows != 1 then
...
...
@@ -351,13 +405,26 @@ endi
print ============================ step10
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
sleep 5000
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode2 -s start
sleep 5000
$x = 0
step10:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show mnodes -x step10
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
goto step10
endi
sql reset query cache
sleep 100
0
sleep 100
sql show db.tables
if $rows != 80 then
...
...
@@ -401,10 +468,23 @@ system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/cfg.sh -n dnode1 -c maxTablesPerVnode -v 25
system sh/cfg.sh -n dnode2 -c maxTablesPerVnode -v 25
sleep 5000
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode2 -s start
sleep 5000
$x = 0
step1xx:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show mnodes -x step1xx
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
goto step1xx
endi
sql create table db.t400 using db.st tags(0)
sql create table db.t401 using db.st tags(1)
...
...
@@ -454,7 +534,7 @@ if $rows != 100 then
endi
sql reset query cache
sleep 100
0
sleep 100
sql select * from db.t000
if $rows != 1 then
...
...
tests/script/general/db/alter_tables_v1.sim
浏览文件 @
5b7a804c
...
...
@@ -5,8 +5,6 @@ system sh/cfg.sh -n dnode1 -c maxVgroupsPerDb -v 1
system sh/cfg.sh -n dnode1 -c maxTablesPerVnode -v 10
system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect
print ============================ step1
...
...
@@ -51,9 +49,22 @@ print ============================ step3
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/cfg.sh -n dnode1 -c maxTablesPerVnode -v 20
sleep 5000
system sh/exec.sh -n dnode1 -s start
sleep 5000
$x = 0
step2:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show mnodes -x step2
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
goto step2
endi
sql create table db.t10 using db.st tags(0)
sql create table db.t11 using db.st tags(1)
...
...
@@ -91,9 +102,22 @@ endi
print ============================ step5
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/cfg.sh -n dnode1 -c maxTablesPerVnode -v 30
sleep 5000
system sh/exec.sh -n dnode1 -s start
sleep 5000
$x = 0
step5:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show mnodes -x step5
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
goto step5
endi
sql create table db.t20 using db.st tags(0)
sql create table db.t21 using db.st tags(1)
...
...
@@ -124,7 +148,7 @@ sql insert into db.t29 values(now, 1)
print ============================ step6
sql reset query cache
sleep 100
0
sleep 100
sql select * from db.t0
if $rows != 1 then
...
...
@@ -148,9 +172,22 @@ endi
print ============================ step7
system sh/exec.sh -n dnode1 -s stop -x SIGINT
sleep 5000
system sh/exec.sh -n dnode1 -s start
sleep 5000
$x = 0
step7:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show mnodes -x step7
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
goto step7
endi
sql reset query cache
sleep 1000
...
...
@@ -190,9 +227,22 @@ endi
print ============================ step9
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/cfg.sh -n dnode1 -c maxTablesPerVnode -v 40
sleep 5000
system sh/exec.sh -n dnode1 -s start
sleep 5000
$x = 0
step9:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show mnodes -x step9
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
goto step9
endi
sql create table db.t30 using db.st tags(0)
sql create table db.t31 using db.st tags(1)
...
...
@@ -249,12 +299,24 @@ if $rows != 40 then
return -1
endi
print ============================ step10
system sh/exec.sh -n dnode1 -s stop -x SIGINT
sleep 5000
system sh/exec.sh -n dnode1 -s start
sleep 5000
$x = 0
step10:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show mnodes -x step10
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
goto step10
endi
sql reset query cache
sleep 1000
...
...
@@ -294,9 +356,22 @@ endi
print ============================ step12
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/cfg.sh -n dnode1 -c maxTablesPerVnode -v 50
sleep 5000
system sh/exec.sh -n dnode1 -s start
sleep 5000
$x = 0
step12:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show mnodes -x step12
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
goto step12
endi
sql create table db.t40 using db.st tags(0)
sql create table db.t41 using db.st tags(1)
...
...
tests/script/general/db/alter_tables_v4.sim
浏览文件 @
5b7a804c
...
...
@@ -5,8 +5,6 @@ system sh/cfg.sh -n dnode1 -c maxVgroupsPerDb -v 4
system sh/cfg.sh -n dnode1 -c maxTablesPerVnode -v 5
system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect
print ============================ step1
...
...
@@ -70,9 +68,22 @@ endi
print ============================ step3
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/cfg.sh -n dnode1 -c maxTablesPerVnode -v 10
sleep 5000
system sh/exec.sh -n dnode1 -s start
sleep 5000
$x = 0
step3:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show mnodes -x step3
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
goto step3
endi
sql create table db.t100 using db.st tags(0)
sql create table db.t101 using db.st tags(1)
...
...
@@ -131,9 +142,22 @@ endi
print ============================ step5
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/cfg.sh -n dnode1 -c maxTablesPerVnode -v 15
sleep 5000
system sh/exec.sh -n dnode1 -s start
sleep 5000
$x = 0
step5:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show mnodes -x step5
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
goto step5
endi
sql create table db.t200 using db.st tags(0)
sql create table db.t201 using db.st tags(1)
...
...
@@ -184,7 +208,7 @@ sql insert into db.t219 values(now, 1)
print ============================ step6
sql reset query cache
sleep 100
0
sleep 100
sql select * from db.t000
if $rows != 1 then
...
...
@@ -250,9 +274,22 @@ endi
print ============================ step9
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/cfg.sh -n dnode1 -c maxTablesPerVnode -v 20
sleep 5000
system sh/exec.sh -n dnode1 -s start
sleep 5000
$x = 0
step9:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show mnodes -x step9
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
goto step9
endi
sql create table db.t300 using db.st tags(0)
sql create table db.t301 using db.st tags(1)
...
...
@@ -331,9 +368,22 @@ endi
print ============================ step10
system sh/exec.sh -n dnode1 -s stop -x SIGINT
sleep 5000
system sh/exec.sh -n dnode1 -s start
sleep 5000
$x = 0
step10:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show mnodes -x step10
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
goto step10
endi
sql reset query cache
sleep 1000
...
...
@@ -378,9 +428,24 @@ endi
print ============================ step12
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/cfg.sh -n dnode1 -c maxTablesPerVnode -v 25
sleep 5000
system sh/exec.sh -n dnode1 -s start
sleep 5000
$x = 0
step12:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show mnodes -x step12
print mnode1 $data2_1
print mnode1 $data2_2
print mnode1 $data2_3
if $data2_1 != master then
goto step12
endi
sql create table db.t400 using db.st tags(0)
sql create table db.t401 using db.st tags(1)
sql create table db.t402 using db.st tags(2)
...
...
tests/script/general/db/delete_reusevnode.sim
浏览文件 @
5b7a804c
...
...
@@ -5,7 +5,6 @@ system sh/deploy.sh -n dnode1 -i 1
print ========= start dnodes
system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect
print ======== step1
...
...
@@ -38,7 +37,6 @@ if $rows != 0 then
endi
system sh/stop_dnodes.sh
sleep 3000
system sh/deploy.sh -n dnode1 -i 1
print ========= start dnodes
...
...
tests/script/general/db/delete_writing1.sim
浏览文件 @
5b7a804c
...
...
@@ -22,7 +22,6 @@ system sh/cfg.sh -n dnode4 -c mnodeEqualVnodeNum -v 4
print ========= start dnodes
system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect
sql create database db
...
...
tests/script/general/table/delete_writing.sim
浏览文件 @
5b7a804c
...
...
@@ -21,8 +21,6 @@ system sh/cfg.sh -n dnode4 -c mnodeEqualVnodeNum -v 4
print ========= start dnodes
system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect
sql create database db
...
...
tests/script/general/wal/sync.sim
浏览文件 @
5b7a804c
...
...
@@ -31,7 +31,6 @@ system sh/cfg.sh -n dnode3 -c maxSQLLength -v 940032
print ============== deploy
system sh/exec.sh -n dnode1 -s start
sleep 5001
sql connect
sql create dnode $hostname2
...
...
@@ -43,8 +42,8 @@ print =============== step1
$x = 0
show1:
$x = $x + 1
sleep
2
000
if $x ==
5
then
sleep
1
000
if $x ==
10
then
return -1
endi
sql show mnodes -x show1
...
...
@@ -82,7 +81,7 @@ restful d1 table_rest 1591772800 30000
restful d1 table_rest 1591872800 30000
restful d1 table_rest 1591972800 30000
sleep 100
0
sleep 100
sql select * from table_rest;
print rows: $rows
if $rows != 300000 then
...
...
@@ -91,29 +90,51 @@ endi
print =============== step3
system sh/exec.sh -n dnode1 -s stop -x SIGINT
sleep 5000
sql select * from table_rest;
print rows: $rows
if $rows != 300000 then
return -1
endi
system sh/exec.sh -n dnode1 -s start -x SIGINT
sleep 5000
$x = 0
a1:
$x = $x + 1
sleep 1000
if $x == 40 then
return -1
endi
sql show vgroups
print online vnodes $data03
if $data03 != 3 then
goto a1
endi
print =============== step4
system sh/exec.sh -n dnode2 -s stop -x SIGINT
sleep 5000
sql select * from table_rest;
print rows: $rows
if $rows != 300000 then
return -1
endi
system sh/exec.sh -n dnode2 -s start -x SIGINT
sleep 5000
$x = 0
a2:
$x = $x + 1
sleep 1000
if $x == 40 then
return -1
endi
sql show vgroups
print online vnodes $data03
if $data03 != 3 then
goto a2
endi
print =============== step5
system sh/exec.sh -n dnode3 -s stop -x SIGINT
sleep 5000
sql select * from table_rest;
print rows: $rows
if $rows != 300000 then
...
...
tests/script/unique/big/balance.sim
浏览文件 @
5b7a804c
...
...
@@ -21,7 +21,6 @@ system sh/cfg.sh -n dnode5 -c maxTablesPerVnode -v 1000
print =============== prepare data
system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect
$i = 0
...
...
@@ -92,8 +91,8 @@ system sh/exec.sh -n dnode2 -s start
$x = 0
show1:
$x = $x + 1
sleep
3
000
if $x ==
1
0 then
sleep
1
000
if $x ==
3
0 then
return -1
endi
...
...
@@ -108,7 +107,7 @@ if $data2_2 != 2 then
endi
sql reset query cache
sleep 100
0
sleep 100
sql select count(*) from t10
print select count(*) from t10 $data00 expect $rowNum
...
...
@@ -143,7 +142,6 @@ endi
print ========== step2
sql create dnode $hostname3
system sh/exec.sh -n dnode3 -s start
sleep 10000
print ========== step3
sql drop dnode $hostname2
...
...
@@ -151,8 +149,8 @@ sql drop dnode $hostname2
$x = 0
show3:
$x = $x + 1
sleep
3
000
if $x ==
1
0 then
sleep
1
000
if $x ==
3
0 then
return -1
endi
...
...
@@ -171,10 +169,9 @@ if $data2_3 != 2 then
endi
system sh/exec.sh -n dnode2 -s stop -x SIGINT
sleep 5000
sql reset query cache
sleep 100
0
sleep 100
sql select count(*) from t10
print select count(*) from t10 $data00 expect $rowNum
...
...
@@ -212,8 +209,8 @@ sql drop dnode $hostname3
$x = 0
show4:
$x = $x + 1
sleep
3
000
if $x ==
1
0 then
sleep
1
000
if $x ==
3
0 then
return -1
endi
...
...
@@ -228,10 +225,9 @@ if $data2_3 != null then
endi
system sh/exec.sh -n dnode3 -s stop -x SIGINT
sleep 5000
sql reset query cache
sleep 100
0
sleep 100
sql select count(*) from t10
print select count(*) from t10 $data00 expect $rowNum
...
...
@@ -267,14 +263,31 @@ print ========== step5
system sh/exec.sh -n dnode4 -s start
sql create dnode $hostname4
sleep 3000
$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
print dnode4 $data4_4
if $data4_4 != ready then
goto step5
endi
sql alter database db replica 2
$x = 0
show5:
$x = $x + 1
sleep
3
000
if $x ==
1
0 then
sleep
1
000
if $x ==
3
0 then
return -1
endi
...
...
@@ -289,7 +302,7 @@ if $data2_4 != 4 then
endi
sql reset query cache
sleep 100
0
sleep 100
sql select count(*) from t10
print select count(*) from t10 $data00 expect $rowNum
...
...
@@ -321,16 +334,14 @@ if $data00 != $totalNum then
goto show5
endi
print ========== step6
sleep 3000
sql alter database db replica 1
$x = 0
show6:
$x = $x + 1
sleep
3
000
if $x ==
1
0 then
sleep
1
000
if $x ==
3
0 then
return -1
endi
...
...
@@ -345,7 +356,7 @@ if $data2_4 != 2 then
endi
sql reset query cache
sleep 100
0
sleep 100
sql select count(*) from t10
print select count(*) from t10 $data00 expect $rowNum
...
...
tests/script/unique/big/tcp.sim
浏览文件 @
5b7a804c
...
...
@@ -15,7 +15,6 @@ system sh/cfg.sh -n dnode1 -c httpDebugFlag -v 135
system sh/cfg.sh -n dnode1 -c debugFlag -v 131
system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect
print ======================== dnode1 start
...
...
@@ -52,7 +51,7 @@ while $i < $tbNum
endw
$i = 0
while $i <
10
while $i <
5
print =============== step3 $i
sql select count(*) from $mt
print ===> $data00 $data01
...
...
@@ -83,7 +82,7 @@ while $i < $tbNum
endw
$i = 0
while $i <
10
while $i <
5
print =============== step5 $i
sql select count(*) from $mt where tgcol < 20200
print ===> $data00 $data01
...
...
tests/script/unique/cluster/balance1.sim
浏览文件 @
5b7a804c
...
...
@@ -84,16 +84,14 @@ endi
print ============================== step2
print ========= start dnode2
sleep 2000
sql create dnode $hostname2
system sh/exec.sh -n dnode2 -s start
sleep 5000
$x = 0
show2:
$x = $x + 1
sleep
2
000
if $x ==
2
0 then
sleep
1
000
if $x ==
4
0 then
return -1
endi
sql show dnodes -x show2
...
...
@@ -129,13 +127,12 @@ sql insert into c_b1_t3 values(1520000024031, 31)
print ============================== step4
print ========= drop dnode2
sql drop dnode $hostname2
sleep 9000
$x = 0
show4:
$x = $x + 1
sleep
2
000
if $x ==
2
0 then
sleep
1
000
if $x ==
4
0 then
return -1
endi
sql show dnodes -x show4
...
...
@@ -164,16 +161,14 @@ print dnode4 ==> $dnode4Role
print ============================== step5
print ========= add dnode2
system sh/exec.sh -n dnode2 -s stop -x SIGINT
sleep 5000
system sh/exec.sh -n dnode3 -s start
sql create dnode $hostname3
sleep 9000
$x = 0
show5:
$x = $x + 1
sleep
2
000
if $x ==
2
0 then
sleep
1
000
if $x ==
4
0 then
return -1
endi
sql show dnodes -x show5
...
...
@@ -212,13 +207,12 @@ sql_error create dnode $hostname1
print ============================== step8
sql drop dnode $hostname3
sleep 15000
$x = 0
show8:
$x = $x + 1
sleep
2
000
if $x ==
3
0 then
sleep
1
000
if $x ==
4
0 then
return -1
endi
sql show dnodes -x show8
...
...
@@ -253,13 +247,12 @@ endi
print ============================== step9
sql create dnode $hostname4
system sh/exec.sh -n dnode4 -s start
sleep 9000
$x = 0
show9:
$x = $x + 1
sleep
2
000
if $x ==
3
0 then
sleep
1
000
if $x ==
4
0 then
return -1
endi
sql show dnodes -x show9
...
...
@@ -302,8 +295,8 @@ sql insert into c_b1_t4 values(1520000024041, 41)
$x = 0
show10:
$x = $x + 1
sleep
2
000
if $x ==
3
0 then
sleep
1
000
if $x ==
4
0 then
return -1
endi
sql show dnodes -x show10
...
...
@@ -335,7 +328,23 @@ sql_error create table c_b1_t5 (t timestamp, i int) -x error3
print ============================== step13
sql create dnode $hostname5
system sh/exec.sh -n dnode5 -s start
sleep 9000
$x = 0
step13:
$x = $x + 1
sleep 1000
if $x == 40 then
return -1
endi
sql show dnodes
print dnode1 $data4_1
print dnode2 $data4_2
print dnode3 $data4_3
print dnode4 $data4_4
print dnode4 $data4_5
if $data4_5 != ready then
goto step13
endi
sql show mnodes
$dnode1Role = $data2_1
...
...
@@ -383,7 +392,23 @@ endi
print ============================== step14
sql create dnode $hostname6
system sh/exec.sh -n dnode6 -s start
sleep 15000
$x = 0
step14:
$x = $x + 1
sleep 1000
if $x == 40 then
return -1
endi
sql show dnodes
print dnode1 $data4_1
print dnode2 $data4_2
print dnode3 $data4_3
print dnode4 $data4_4
print dnode4 $data4_5
if $data4_6 != ready then
goto step14
endi
sql create database c_b1_d7
sql use c_b1_d7
...
...
@@ -406,7 +431,7 @@ sql insert into c_b1_t8 values(1520000024081, 81)
$x = 0
show14:
$x = $x + 1
sleep
2
000
sleep
1
000
if $x == 30 then
return -1
endi
...
...
@@ -440,7 +465,7 @@ print ============================== step17
print ========= check data
sql reset query cache
sleep 100
0
sleep 100
sql use c_b1_d1
sql select * from c_b1_d1.c_b1_t1
...
...
tests/script/unique/cluster/balance2.sim
浏览文件 @
5b7a804c
...
...
@@ -50,12 +50,48 @@ print ========= start dnode1
system sh/exec.sh -n dnode1 -s start
sql connect
sleep 4001
sql create dnode $hostname2
sql create dnode $hostname3
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start
sleep 4001
$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
if $data2_2 != slave then
goto step1
endi
if $data2_3 != slave then
goto step1
endi
sql create database c_b2_d1 replica 2
sql use c_b2_d1
...
...
@@ -112,13 +148,12 @@ endi
print ============================== step2
print ========= drop dnode2
sql drop dnode $hostname2
sleep 9000
$x = 0
show2:
$x = $x + 1
sleep
3
000
if $x ==
2
0 then
sleep
1
000
if $x ==
3
0 then
return -1
endi
sql show dnodes -x show2
...
...
@@ -155,13 +190,12 @@ print ============================== step3
print ========= start dnode4
sql create dnode $hostname4
system sh/exec.sh -n dnode4 -s start
sleep 10000
$x = 0
show3:
$x = $x + 1
sleep
3
000
if $x ==
2
0 then
sleep
1
000
if $x ==
3
0 then
return -1
endi
sql show dnodes -x show3
...
...
@@ -209,13 +243,12 @@ endi
print ============================== step4
print ========= drop dnode3
sql drop dnode $hostname3
sleep 9000
$x = 0
show4:
$x = $x + 1
sleep
3
000
if $x ==
2
0 then
sleep
1
000
if $x ==
4
0 then
return -1
endi
sql show dnodes -x show4
...
...
@@ -266,12 +299,11 @@ print ============================== step5
print ========= start dnode3
sql create dnode $hostname5
system sh/exec.sh -n dnode5 -s start
sleep 9000
$x = 0
show5:
$x = $x + 1
sleep
2
000
sleep
1
000
if $x == 30 then
return -1
endi
...
...
@@ -304,7 +336,7 @@ print dnode5 ==> $dnode5Role
print ============================== step6
system sh/exec.sh -n dnode1 -s stop -x SIGINT
print stop dnode1 and sleep 10000
sleep
10
000
sleep
5
000
sql drop dnode $hostname1
print drop dnode1 and sleep 9000
...
...
@@ -364,7 +396,7 @@ print ============================== step12
print ========= check data
sql reset query cache
sleep 100
0
sleep 100
sql select * from c_b2_d1.c_b2_t1 order by t desc
print $data01 $data11 $data21 $data31 $data41
...
...
tests/script/unique/cluster/vgroup100.sim
浏览文件 @
5b7a804c
...
...
@@ -17,7 +17,6 @@ system sh/cfg.sh -n dnode3 -c mnodeEqualVnodeNum -v 0
print ============================== step1
system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect
print ============================== step2
...
...
@@ -27,8 +26,6 @@ system sh/exec.sh -n dnode2 -s start
sql create dnode $hostname3
system sh/exec.sh -n dnode3 -s start
sleep 3000
$maxNum = 102
$maxNum = 12
...
...
@@ -92,13 +89,11 @@ print ============================== step5
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
sleep 5000
print ============================== step6
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start
sleep 10000
print ============================== step7
...
...
tests/script/unique/db/delete.sim
浏览文件 @
5b7a804c
...
...
@@ -18,7 +18,6 @@ system sh/cfg.sh -n dnode3 -c maxTablesPerVnode -v 1000
print ========= start dnodes
system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect
sql create dnode $hostname2
sql create dnode $hostname3
...
...
@@ -38,8 +37,6 @@ while $i < 2000
$i = $i + 1
endw
sleep 2500
sql show db.vgroups
if $rows != 2 then
return -1
...
...
@@ -73,7 +70,6 @@ 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
sleep 5000
system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start
...
...
@@ -92,7 +88,6 @@ if $data2_1 != master then
goto step3
endi
sleep 1000
system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode2 -s stop -x SIGINT
...
...
tests/script/unique/db/delete_part.sim
浏览文件 @
5b7a804c
...
...
@@ -31,11 +31,29 @@ system sh/cfg.sh -n dnode4 -c maxTablesPerVnode -v 4
print ========= start dnodes
system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect
sql create dnode $hostname2
system sh/exec.sh -n dnode2 -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
if $data4_1 != ready then
goto step1
endi
if $data4_2 != ready then
goto step1
endi
$loop = 0
begin:
...
...
@@ -53,7 +71,6 @@ begin:
sql insert into t13 values(now, 1 )
sql create table t14 (ts timestamp, i int)
sql insert into t14 values(now, 1 )
sleep 1200
sql create table t21 (ts timestamp, i int)
sql insert into t21 values(now, 1 )
...
...
@@ -63,7 +80,6 @@ begin:
sql insert into t23 values(now, 1 )
sql create table t24 (ts timestamp, i int)
sql insert into t24 values(now, 1 )
sleep 1200
sql create table t31 (ts timestamp, i int)
sql insert into t31 values(now, 1 )
...
...
@@ -73,7 +89,6 @@ begin:
sql insert into t33 values(now, 1 )
sql create table t34 (ts timestamp, i int)
sql insert into t34 values(now, 1 )
sleep 1200
sql create table t41 (ts timestamp, i int)
sql insert into t41 values(now, 1 )
...
...
@@ -83,7 +98,6 @@ begin:
sql insert into t43 values(now, 1 )
sql create table t44 (ts timestamp, i int)
sql insert into t44 values(now, 1 )
sleep 1200
sql create table t51 (ts timestamp, i int)
sql insert into t51 values(now, 1 )
...
...
@@ -93,7 +107,6 @@ begin:
sql insert into t53 values(now, 1 )
sql create table t54 (ts timestamp, i int)
sql insert into t54 values(now, 1 )
sleep 1200
sql create table t61 (ts timestamp, i int)
sql insert into t61 values(now, 1 )
...
...
@@ -103,7 +116,6 @@ begin:
sql insert into t63 values(now, 1 )
sql create table t64 (ts timestamp, i int)
sql insert into t64 values(now, 1 )
sleep 1200
sql create table t71 (ts timestamp, i int)
sql insert into t71 values(now, 1 )
...
...
@@ -113,7 +125,6 @@ begin:
sql insert into t73 values(now, 1 )
sql create table t74 (ts timestamp, i int)
sql insert into t74 values(now, 1 )
sleep 1200
sql create table t81 (ts timestamp, i int)
sql insert into t81 values(now, 1 )
...
...
@@ -123,7 +134,6 @@ begin:
sql insert into t83 values(now, 1 )
sql create table t84 (ts timestamp, i int)
sql insert into t84 values(now, 1 )
sleep 1200
sql show dnodes
print dnode1 openVnodes $data2_1
...
...
@@ -138,29 +148,36 @@ begin:
print ======== step2 $loop
system sh/exec.sh -n dnode2 -s stop
sleep 1000
print ==> drop database $db
sql drop database $db
print ======== step3 $loop
sleep 2000
system sh/exec.sh -n dnode2 -s start
sleep 15000
sql show dnodes
$x = 0
step3:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show dnodes -x step3
print dnode1 openVnodes $data2_1 $data4_1
print dnode2 openVnodes $data2_2 $data4_2
if $data2_1 != 0 then
return -1
goto step3
endi
if $data2_2 != 0 then
return -1
goto step3
endi
if $data4_1 != ready then
return -1
goto step3
endi
if $data4_2 != ready then
return -1
goto step3
endi
print ===> test times : $loop
...
...
@@ -171,7 +188,7 @@ begin:
$loop = $loop + 1
sql reset query cache
sleep 100
0
sleep 100
goto begin
...
...
tests/script/unique/dnode/balance1.sim
浏览文件 @
5b7a804c
...
...
@@ -33,7 +33,6 @@ system sh/cfg.sh -n dnode4 -c maxTablesPerVnode -v 4
print ========== step1
system sh/exec.sh -n dnode1 -s start
sql connect
sleep 3000
sql create database d1
sql create table d1.t1 (t timestamp, i int)
...
...
@@ -50,15 +49,14 @@ if $data2_1 != 1 then
endi
print ========== step2
sleep 2000
sql create dnode $hostname2
system sh/exec.sh -n dnode2 -s start
$x = 0
show2:
$x = $x + 1
sleep
2
000
if $x ==
1
0 then
sleep
1
000
if $x ==
2
0 then
return -1
endi
...
...
@@ -124,8 +122,8 @@ system sh/exec.sh -n dnode3 -s start
$x = 0
show5:
$x = $x + 1
sleep
3
000
if $x ==
2
0 then
sleep
1
000
if $x ==
3
0 then
return -1
endi
...
...
@@ -174,8 +172,8 @@ system sh/exec.sh -n dnode4 -s start
$x = 0
show7:
$x = $x + 1
sleep
2
000
if $x ==
1
0 then
sleep
1
000
if $x ==
2
0 then
return -1
endi
...
...
@@ -258,7 +256,7 @@ endi
system sh/exec.sh -n dnode3 -s stop -x SIGINT
sql reset query cache
sleep 100
0
sleep 100
print ========== step10
sql select * from d1.t1 order by t desc
...
...
tests/script/unique/dnode/balance2.sim
浏览文件 @
5b7a804c
...
...
@@ -32,7 +32,29 @@ sql create dnode $hostname2
sql create dnode $hostname3
system sh/exec.sh -n dnode2 -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 create database d1 replica 2
sql create table d1.t1 (t timestamp, i int)
...
...
@@ -70,8 +92,8 @@ sql drop dnode $hostname2
$x = 0
show2:
$x = $x + 1
sleep
2
000
if $x ==
1
0 then
sleep
1
000
if $x ==
2
0 then
return -1
endi
...
...
@@ -90,7 +112,6 @@ if $data2_3 != 2 then
endi
system sh/exec.sh -n dnode2 -s stop -x SIGINT
sleep 5000
print ========== step3
sql create dnode $hostname4
...
...
@@ -156,8 +177,8 @@ system sh/exec.sh -n dnode5 -s start
$x = 0
show5:
$x = $x + 1
sleep
2
000
if $x ==
1
0 then
sleep
1
000
if $x ==
2
0 then
return -1
endi
...
...
@@ -189,8 +210,8 @@ sql drop dnode $hostname3
$x = 0
show6:
$x = $x + 1
sleep
2
000
if $x ==
1
0 then
sleep
1
000
if $x ==
2
0 then
return -1
endi
...
...
@@ -217,10 +238,8 @@ if $data2_5 != 3 then
endi
system sh/exec.sh -n dnode2 -s stop -x SIGINT
sleep 5000
sql reset query cache
sleep 100
0
sleep 100
print ========== step7
sql select * from d1.t1 order by t desc
...
...
tests/script/unique/dnode/balance3.sim
浏览文件 @
5b7a804c
...
...
@@ -38,7 +38,32 @@ sql create dnode $hostname4
system sh/exec.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -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 create database d1 replica 3
sql create table d1.t1 (t timestamp, i int)
...
...
@@ -81,7 +106,7 @@ sql drop dnode $hostname2
$x = 0
show2:
$x = $x + 1
sleep
2
000
sleep
1
000
if $x == 20 then
return -1
endi
...
...
@@ -106,7 +131,6 @@ if $data2_4 != 2 then
endi
system sh/exec.sh -n dnode2 -s stop -x SIGINT
sleep 5000
print ========== step
sql create dnode $hostname5
system sh/exec.sh -n dnode5 -s start
...
...
@@ -114,8 +138,8 @@ system sh/exec.sh -n dnode5 -s start
$x = 0
show3:
$x = $x + 1
sleep
4
000
if $x ==
15
then
sleep
1
000
if $x ==
60
then
return -1
endi
...
...
@@ -154,8 +178,8 @@ sql insert into d3.t3 values(now+5s, 31)
$x = 0
show4:
$x = $x + 1
sleep
2
000
if $x ==
2
0 then
sleep
1
000
if $x ==
3
0 then
return -1
endi
...
...
@@ -189,8 +213,8 @@ system sh/exec.sh -n dnode6 -s start
$x = 0
show5:
$x = $x + 1
sleep
2
000
if $x ==
1
0 then
sleep
1
000
if $x ==
2
0 then
return -1
endi
...
...
@@ -216,8 +240,8 @@ sql drop dnode $hostname3
$x = 0
show6:
$x = $x + 1
sleep
2
000
if $x ==
2
0 then
sleep
1
000
if $x ==
3
0 then
return -1
endi
...
...
@@ -245,10 +269,8 @@ if $data2_5 != 3 then
endi
system sh/exec.sh -n dnode3 -s stop -x SIGINT
sleep 5000
sql reset query cache
sleep 100
0
sleep 100
print ========== step7
sql select * from d1.t1 order by t desc
...
...
tests/script/unique/dnode/reason.sim
浏览文件 @
5b7a804c
...
...
@@ -5,7 +5,6 @@ system sh/deploy.sh -n dnode2 -i 2
print ========== step1
system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect
sql create dnode $hostname2
...
...
@@ -25,31 +24,54 @@ print dnode2 off: $data7_2
print ========== step3
system sh/exec.sh -n dnode2 -s stop
sleep 3000
sql show dnodes
$x = 0
step3:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
print dnode1 off: $data7_1
print dnode2 off: $data7_2
if $data7_2 != @status msg timeout@ then
return -1
goto step3
endi
print ========== step4
sql drop dnode $hostname2
sleep 5000
$x = 0
step4:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show dnodes
if $rows != 1 then
return -1
goto step4
endi
print ========== step5
system sh/exec.sh -n dnode2 -s start
sql create dnode $hostname2
sleep 3000
$x = 0
step5:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show dnodes
print dnode1 off: $data7_1
print dnode2 off: $data7_3
if $data7_3 != @dnodeId not match@ then
return -1
goto step5
endi
print ========== step6
...
...
@@ -58,12 +80,19 @@ system sh/cfg.sh -n dnode4 -c mnodeEqualVnodeNum -v 3
system sh/exec.sh -n dnode4 -s start
sql create dnode $hostname4
sleep 3000
$x = 0
step6:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show dnodes
print dnode1 off: $data7_1
print dnode4 off: $data7_4
if $data7_4 != @mnEqualVn not match@ then
return -1
goto step6
endi
print ========== step7
...
...
@@ -72,12 +101,19 @@ system sh/cfg.sh -n dnode5 -c statusInterval -v 3
system sh/exec.sh -n dnode5 -s start
sql create dnode $hostname5
sleep 3000
$x = 0
step7:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show dnodes
print dnode1 off: $data7_1
print dnode5 off: $data7_5
if $data7_5 != @interval not match@ then
return -1
goto step7
endi
print ========== step8
...
...
@@ -86,12 +122,19 @@ system sh/cfg.sh -n dnode6 -c balance -v 0
system sh/exec.sh -n dnode6 -s start
sql create dnode $hostname6
sleep 3000
$x = 0
step8:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show dnodes
print dnode1 off: $data7_1
print dnode6 off: $data7_6
if $data7_6 != @balance not match@ then
return -1
goto step8
endi
print ========== step9
...
...
@@ -100,12 +143,19 @@ system sh/cfg.sh -n dnode7 -c maxTablesPerVnode -v 3000
system sh/exec.sh -n dnode7 -s start
sql create dnode $hostname7
sleep 3000
$x = 0
step9:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show dnodes
print dnode1 off: $data7_1
print dnode7 off: $data7_7
if $data7_7 != @maxTabPerVn not match@ then
return -1
goto step9
endi
print ========== step10
...
...
@@ -114,12 +164,19 @@ system sh/cfg.sh -n dnode8 -c maxVgroupsPerDb -v 3
system sh/exec.sh -n dnode8 -s start
sql create dnode $hostname8
sleep 3000
$x = 0
step10:
$x = $x + 1
sleep 1000
if $x == 10 then
return -1
endi
sql show dnodes
print dnode1 off: $data7_1
print dnode8 off: $data7_8
if $data7_8 != @maxVgPerDb not match@ then
return -1
goto step10
endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
...
...
tests/script/unique/dnode/remove1.sim
浏览文件 @
5b7a804c
...
...
@@ -22,7 +22,6 @@ system sh/cfg.sh -n dnode4 -c maxTablesPerVnode -v 4
print ========== step1
system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect
sql create database d1
...
...
@@ -50,7 +49,26 @@ endi
print ========== step2
sql create dnode $hostname2
system sh/exec.sh -n dnode2 -s start
sleep 9000
$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
print dnode4 $data4_4
if $data4_1 != ready then
goto step2
endi
if $data4_2 != ready then
goto step2
endi
sql create database d3 replica 2
sql create table d3.t3 (t timestamp, i int)
...
...
@@ -81,12 +99,11 @@ endi
print ========== step3
sql drop dnode $hostname2
sleep 7001
$x = 0
show3:
$x = $x + 1
sleep
2
000
if $x ==
1
0 then
sleep
1
000
if $x ==
2
0 then
return -1
endi
...
...
@@ -101,8 +118,8 @@ system sh/exec.sh -n dnode3 -s start
$x = 0
show4:
$x = $x + 1
sleep
2
000
if $x ==
1
0 then
sleep
1
000
if $x ==
2
0 then
return -1
endi
...
...
@@ -115,7 +132,6 @@ if $data2_2 != null then
endi
system sh/exec.sh -n dnode2 -s stop -x SIGINT
sleep 5000
print ========== step5
sql create dnode $hostname4
...
...
@@ -124,8 +140,8 @@ system sh/exec.sh -n dnode4 -s start
$x = 0
show5:
$x = $x + 1
sleep
2
000
if $x ==
1
0 then
sleep
1
000
if $x ==
2
0 then
return -1
endi
sql show dnodes
...
...
tests/script/unique/dnode/remove2.sim
浏览文件 @
5b7a804c
...
...
@@ -22,7 +22,6 @@ system sh/cfg.sh -n dnode4 -c maxTablesPerVnode -v 4
print ========== step1
system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect
sql create database d1
...
...
@@ -50,7 +49,26 @@ endi
print ========== step2
sql create dnode $hostname2
system sh/exec.sh -n dnode2 -s start
sleep 9000
$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
print dnode4 $data4_4
if $data4_1 != ready then
goto step2
endi
if $data4_2 != ready then
goto step2
endi
sql create database d3 replica 2
sql create table d3.t3 (t timestamp, i int)
...
...
@@ -81,7 +99,6 @@ endi
print ========== step3
system sh/exec.sh -n dnode2 -s stop -x SIGINT
sql drop dnode $hostname2
sleep 5000
sql show dnodes
print dnode1 openVnodes $data2_1
...
...
@@ -91,14 +108,20 @@ print ========== step4
sql create dnode $hostname3
system sh/exec.sh -n dnode3 -s start
sleep 5000
$x = 0
step4:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
endi
sql show dnodes
print dnode1 openVnodes $data2_1
print dnode2 openVnodes $data2_2
print dnode3 openVnodes $data2_3
if $data2_3 != 0 then
return -1
goto step4
endi
print ============ step 4.1
...
...
@@ -107,8 +130,8 @@ system sh/exec.sh -n dnode2 -s start
$x = 0
show4:
$x = $x + 1
sleep
2
000
if $x ==
1
0 then
sleep
1
000
if $x ==
2
0 then
return -1
endi
...
...
tests/script/unique/dnode/vnode_clean.sim
浏览文件 @
5b7a804c
...
...
@@ -45,8 +45,8 @@ system sh/exec.sh -n dnode2 -s start
$x = 0
show2:
$x = $x + 1
sleep
2
000
if $x ==
1
0 then
sleep
1
000
if $x ==
2
0 then
return -1
endi
sql show dnodes
...
...
@@ -86,8 +86,8 @@ sql drop dnode $hostname2
$x = 0
show4:
$x = $x + 1
sleep
2
000
if $x ==
1
0 then
sleep
1
000
if $x ==
2
0 then
return -1
endi
sql show dnodes
...
...
@@ -106,15 +106,14 @@ endi
system sh/exec.sh -n dnode2 -s stop -x SIGINT
print ========== step5
sleep 5000
sql create dnode $hostname3
system sh/exec.sh -n dnode3 -s start
$x = 0
show5:
$x = $x + 1
sleep
3
000
if $x ==
2
0 then
sleep
1
000
if $x ==
4
0 then
return -1
endi
sql show dnodes
...
...
@@ -153,8 +152,8 @@ system sh/exec.sh -n dnode4 -s start
$x = 0
show7:
$x = $x + 1
sleep
3
000
if $x ==
2
0 then
sleep
1
000
if $x ==
4
0 then
return -1
endi
...
...
@@ -184,8 +183,8 @@ sql insert into d4.t4 values(now+5s, 41)
$x = 0
show8:
$x = $x + 1
sleep
2
000
if $x ==
1
0 then
sleep
1
000
if $x ==
2
0 then
return -1
endi
sql show dnodes
...
...
@@ -208,8 +207,8 @@ sql drop dnode $hostname3
$x = 0
show9:
$x = $x + 1
sleep
2
000
if $x ==
1
0 then
sleep
1
000
if $x ==
2
0 then
return -1
endi
...
...
@@ -228,7 +227,6 @@ if $data2_4 != 4 then
endi
system sh/exec.sh -n dnode3 -s stop
sleep 5000
print ========== step10
sql select * from d1.t1 order by t desc
...
...
tests/script/unique/import/replica2.sim
浏览文件 @
5b7a804c
...
...
@@ -27,11 +27,30 @@ system sh/cfg.sh -n dnode4 -c walLevel -v 2
print ========= start dnode1
system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect
sql create dnode $hostname2
system sh/exec.sh -n dnode2 -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
print dnode4 $data4_4
if $data4_1 != ready then
goto step1
endi
if $data4_2 != ready then
goto step1
endi
sql create database ir2db replica 2 days 7
sql use ir2db
...
...
@@ -96,9 +115,22 @@ endi
print ================== dnode restart
system sh/exec.sh -n dnode1 -s stop -x SIGINT
sleep 5000
system sh/exec.sh -n dnode1 -s start
sleep 5000
$x = 0
a1:
$x = $x + 1
sleep 1000
if $x == 40 then
return -1
endi
sql show vgroups
print online vnodes $data03
if $data03 != 2 then
goto a1
endi
sql select * from tb;
if $rows != 14 then
return -1
...
...
@@ -163,9 +195,22 @@ endi
print ================= step10
system sh/exec.sh -n dnode1 -s stop -x SIGINT
sleep 5000
system sh/exec.sh -n dnode1 -s start
sleep 5000
$x = 0
a2:
$x = $x + 1
sleep 1000
if $x == 40 then
return -1
endi
sql show vgroups
print online vnodes $data03
if $data03 != 2 then
goto a2
endi
sql select * from tb;
print $rows
if $rows != 35 then
...
...
@@ -193,9 +238,20 @@ endi
print ================= step13
system sh/exec.sh -n dnode2 -s stop -x SIGINT
sleep 5000
system sh/exec.sh -n dnode2 -s start
sleep 5000
$x = 0
a3:
$x = $x + 1
sleep 1000
if $x == 40 then
return -1
endi
sql show vgroups
print online vnodes $data03
if $data03 != 2 then
goto a3
endi
print ================= step14
#1520000000000
...
...
@@ -214,12 +270,24 @@ endi
print ================= step15
system sh/exec.sh -n dnode1 -s stop -x SIGINT
sleep 5000
system sh/exec.sh -n dnode1 -s start
sleep 5000
$x = 0
a4:
$x = $x + 1
sleep 1000
if $x == 40 then
return -1
endi
sql show vgroups
print online vnodes $data03
if $data03 != 2 then
goto a4
endi
sql select * from tb;
if $rows != 52 then
return -1
goto a4
endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
...
...
tests/script/unique/import/replica3.sim
浏览文件 @
5b7a804c
...
...
@@ -27,7 +27,6 @@ system sh/cfg.sh -n dnode4 -c walLevel -v 2
print ========= start dnode1
system sh/exec.sh -n dnode1 -s start
sleep 3000
sql connect
sql create dnode $hostname2
...
...
@@ -35,6 +34,29 @@ 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
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 create database ir3db replica 3 days 7
sql use ir3db
...
...
@@ -99,9 +121,20 @@ endi
print ================== dnode restart
system sh/exec.sh -n dnode1 -s stop -x SIGINT
sleep 5000
system sh/exec.sh -n dnode1 -s start
sleep 5000
$x = 0
a4:
$x = $x + 1
sleep 1000
if $x == 40 then
return -1
endi
sql show vgroups
print online vnodes $data03
if $data03 != 3 then
goto a4
endi
sql select * from tb;
if $rows != 14 then
return -1
...
...
@@ -166,9 +199,21 @@ endi
print ================= step10
system sh/exec.sh -n dnode1 -s stop -x SIGINT
sleep 5000
system sh/exec.sh -n dnode1 -s start
sleep 5000
$x = 0
step10:
$x = $x + 1
sleep 1000
if $x == 40 then
return -1
endi
sql show vgroups
print online vnodes $data03
if $data03 != 3 then
goto step10
endi
sql select * from tb;
print $rows
if $rows != 35 then
...
...
@@ -217,10 +262,21 @@ endi
print ================= step15
system sh/exec.sh -n dnode3 -s stop -x SIGINT
sleep 5000
system sh/exec.sh -n dnode3 -s start
sleep 5000
$x = 0
step15:
$x = $x + 1
sleep 1000
if $x == 40 then
return -1
endi
sql show vgroups
print online vnodes $data03
if $data03 != 3 then
goto step15
endi
sql select * from tb;
if $rows != 52 then
return -1
endi
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录