Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
taosdata
TDengine
提交
e1e4a34a
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看板
未验证
提交
e1e4a34a
编写于
5月 15, 2020
作者:
S
Shengliang Guan
提交者:
GitHub
5月 15, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1922 from taosdata/feature/mwrite
scripts
上级
d299208f
75f3a460
变更
27
显示空白变更内容
内联
并排
Showing
27 changed file
with
435 addition
and
601 deletion
+435
-601
tests/script/general/stable/dnode3.sim
tests/script/general/stable/dnode3.sim
+223
-0
tests/script/general/stable/testSuite.sim
tests/script/general/stable/testSuite.sim
+1
-0
tests/script/jenkins/basic.txt
tests/script/jenkins/basic.txt
+25
-28
tests/script/unique/db/delete.sim
tests/script/unique/db/delete.sim
+2
-1
tests/script/unique/db/delete_part.sim
tests/script/unique/db/delete_part.sim
+110
-11
tests/script/unique/db/replica_part.sim
tests/script/unique/db/replica_part.sim
+3
-3
tests/script/unique/http/opentsdb.sim
tests/script/unique/http/opentsdb.sim
+1
-1
tests/script/unique/stable/balance_replica1.sim
tests/script/unique/stable/balance_replica1.sim
+2
-5
tests/script/unique/stable/dnode2.sim
tests/script/unique/stable/dnode2.sim
+3
-6
tests/script/unique/stable/dnode2_stop.sim
tests/script/unique/stable/dnode2_stop.sim
+5
-8
tests/script/unique/stable/dnode3.sim
tests/script/unique/stable/dnode3.sim
+5
-9
tests/script/unique/stable/replica2_dnode4.sim
tests/script/unique/stable/replica2_dnode4.sim
+7
-12
tests/script/unique/stable/replica2_vnode3.sim
tests/script/unique/stable/replica2_vnode3.sim
+3
-6
tests/script/unique/stable/replica3_dnode6.sim
tests/script/unique/stable/replica3_dnode6.sim
+11
-19
tests/script/unique/stable/replica3_vnode3.sim
tests/script/unique/stable/replica3_vnode3.sim
+9
-12
tests/script/unique/stable/testSuite.sim
tests/script/unique/stable/testSuite.sim
+0
-0
tests/script/unique/table/back_insert.sim
tests/script/unique/table/back_insert.sim
+0
-7
tests/script/unique/table/delete_part.sim
tests/script/unique/table/delete_part.sim
+0
-85
tests/script/unique/table/testSuite.sim
tests/script/unique/table/testSuite.sim
+0
-1
tests/script/unique/testSuite.sim
tests/script/unique/testSuite.sim
+0
-3
tests/script/unique/vnode/commit.sim
tests/script/unique/vnode/commit.sim
+0
-158
tests/script/unique/vnode/many.sim
tests/script/unique/vnode/many.sim
+7
-7
tests/script/unique/vnode/replica2_basic.sim
tests/script/unique/vnode/replica2_basic.sim
+0
-199
tests/script/unique/vnode/replica2_repeat.sim
tests/script/unique/vnode/replica2_repeat.sim
+2
-2
tests/script/unique/vnode/replica3_repeat.sim
tests/script/unique/vnode/replica3_repeat.sim
+2
-2
tests/script/unique/vnode/replica3_vgroup.sim
tests/script/unique/vnode/replica3_vgroup.sim
+14
-14
tests/script/unique/vnode/testSuite.sim
tests/script/unique/vnode/testSuite.sim
+0
-2
未找到文件。
tests/script/general/stable/dnode3.sim
0 → 100644
浏览文件 @
e1e4a34a
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 0
system sh/cfg.sh -n dnode2 -c walLevel -v 0
system sh/cfg.sh -n dnode3 -c walLevel -v 0
system sh/cfg.sh -n dnode4 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
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/exec.sh -n dnode1 -s start
sql connect
sql create dnode $hostname2
sql create dnode $hostname3
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
$x = 0
createDnode:
$x = $x + 1
sleep 1000
if $x == 20 then
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
print ======================== dnode1 start
$dbPrefix = r3v3_db
$tbPrefix = r3v3_tb
$mtPrefix = r3v3_mt
$tbNum = 10
$rowNum = 20
$totalNum = 200
print =============== step1
$i = 0
$db = $dbPrefix . $i
$mt = $mtPrefix . $i
sql create database $db maxTables 4
sql use $db
sql create table $mt (ts timestamp, tbcol int) TAGS(tgcol int)
$i = 0
while $i < $tbNum
$tb = $tbPrefix . $i
sql create table $tb using $mt tags( $i )
$x = 0
while $x < $rowNum
$val = $x * 60000
$ms = 1519833600000 + $val
sql insert into $tb values ($ms , $x )
$x = $x + 1
endw
$i = $i + 1
endw
sql show vgroups
print vgroups ==> $rows
if $rows != 3 then
return -1
endi
sleep 100
print =============== step2
$i = 1
$tb = $tbPrefix . $i
sql select count(*) from $tb
print ===> $data00
if $data00 != $rowNum then
return -1
endi
sql select count(tbcol) from $tb
print ===> $data00
if $data00 != $rowNum then
return -1
endi
print =============== step3
sql select count(tbcol) from $tb where ts <= 1519833840000
print ===> $data00
if $data00 != 5 then
return -1
endi
print =============== step4
sql select count(tbcol) as b from $tb
print ===> $data00
if $data00 != $rowNum then
return -1
endi
print =============== step5
sql select 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)
print ===> $data01
if $data01 != $rowNum then
return -1
endi
print =============== step6
sql select count(tbcol) as b from $tb where ts <= 1519833840000 interval(1m)
print ===> $data01
if $data01 != 1 then
return -1
endi
if $rows != 5 then
return -1
endi
print =============== step7
print select count(*) from $mt
sql select count(*) from $mt
print ===> $data00
if $data00 != $totalNum then
return -1
endi
sql select count(tbcol) from $mt
print ===> $data00
if $data00 != $totalNum then
return -1
endi
print =============== step8
sql select count(tbcol) as c from $mt where ts <= 1519833840000
print ===> $data00
if $data00 != 50 then
return -1
endi
sql select count(tbcol) as c from $mt where tgcol < 5
print ===> $data00
if $data00 != 100 then
return -1
endi
sql select count(tbcol) as c from $mt where tgcol < 5 and ts <= 1519833840000
print ===> $data00
if $data00 != 25 then
return -1
endi
print =============== step9
sql select 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)
print ===> $data01
if $data01 != 200 then
return -1
endi
print =============== step10
sql select count(tbcol) as b from $mt group by tgcol
print ===> $data00
if $data00 != $rowNum then
return -1
endi
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
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/general/stable/testSuite.sim
浏览文件 @
e1e4a34a
run general/stable/disk.sim
run general/stable/disk.sim
run general/stable/dnode3.sim
run general/stable/metrics.sim
run general/stable/metrics.sim
run general/stable/values.sim
run general/stable/values.sim
run general/stable/vnode3.sim
run general/stable/vnode3.sim
tests/script/jenkins/basic.txt
浏览文件 @
e1e4a34a
...
@@ -85,10 +85,10 @@ cd ../../../debug; make
...
@@ -85,10 +85,10 @@ cd ../../../debug; make
./test.sh -f general/import/basic.sim
./test.sh -f general/import/basic.sim
./test.sh -f general/import/commit.sim
./test.sh -f general/import/commit.sim
./test.sh -f general/import/large.sim
./test.sh -f general/import/large.sim
#
hongze
./test.sh -f general/import/replica1.sim
#
liao
./test.sh -f general/import/replica1.sim
./test.sh -f general/insert/basic.sim
./test.sh -f general/insert/basic.sim
#
hongze
./test.sh -f general/insert/insert_drop.sim
#
liao
./test.sh -f general/insert/insert_drop.sim
./test.sh -f general/insert/query_block1_memory.sim
./test.sh -f general/insert/query_block1_memory.sim
./test.sh -f general/insert/query_block2_memory.sim
./test.sh -f general/insert/query_block2_memory.sim
./test.sh -f general/insert/query_block1_file.sim
./test.sh -f general/insert/query_block1_file.sim
...
@@ -150,6 +150,7 @@ cd ../../../debug; make
...
@@ -150,6 +150,7 @@ cd ../../../debug; make
#./test.sh -f general/parser/bug.sim
#./test.sh -f general/parser/bug.sim
./test.sh -f general/stable/disk.sim
./test.sh -f general/stable/disk.sim
#./test.sh -f general/stable/dnode3.sim
./test.sh -f general/stable/metrics.sim
./test.sh -f general/stable/metrics.sim
./test.sh -f general/stable/values.sim
./test.sh -f general/stable/values.sim
./test.sh -f general/stable/vnode3.sim
./test.sh -f general/stable/vnode3.sim
...
@@ -251,16 +252,16 @@ cd ../../../debug; make
...
@@ -251,16 +252,16 @@ cd ../../../debug; make
./test.sh -u -f unique/column/replica3.sim
./test.sh -u -f unique/column/replica3.sim
#hongze ./test.sh -u -f unique/db/commit.sim
#hongze
crash
./test.sh -u -f unique/db/commit.sim
./test.sh -u -f unique/db/delete.sim
./test.sh -u -f unique/db/delete.sim
#
./test.sh -u -f unique/db/delete_part.sim
./test.sh -u -f unique/db/delete_part.sim
##
./test.sh -u -f unique/db/replica_add12.sim
./test.sh -u -f unique/db/replica_add12.sim
#
#
./test.sh -u -f unique/db/replica_add13.sim
#
hongze crash
./test.sh -u -f unique/db/replica_add13.sim
#
#
./test.sh -u -f unique/db/replica_add23.sim
#
hongze crash
./test.sh -u -f unique/db/replica_add23.sim
#
#
./test.sh -u -f unique/db/replica_reduce21.sim
#
hongze crash
./test.sh -u -f unique/db/replica_reduce21.sim
##
./test.sh -u -f unique/db/replica_reduce32.sim
./test.sh -u -f unique/db/replica_reduce32.sim
#
#.
/test.sh -u -f unique/db/replica_reduce31.sim
#
hongze crash
/test.sh -u -f unique/db/replica_reduce31.sim
##
./test.sh -u -f unique/db/replica_part.sim
./test.sh -u -f unique/db/replica_part.sim
##./test.sh -u -f unique/dnode/balance1.sim
##./test.sh -u -f unique/dnode/balance1.sim
##./test.sh -u -f unique/dnode/balance2.sim
##./test.sh -u -f unique/dnode/balance2.sim
...
@@ -278,14 +279,14 @@ cd ../../../debug; make
...
@@ -278,14 +279,14 @@ cd ../../../debug; make
#./test.sh -u -f unique/import/replica2.sim
#./test.sh -u -f unique/import/replica2.sim
#./test.sh -u -f unique/import/replica3.sim
#./test.sh -u -f unique/import/replica3.sim
#./test.sh -u -f unique/
metrics
/balance_replica1.sim
#./test.sh -u -f unique/
stable
/balance_replica1.sim
#./test.sh -u -f unique/
metrics
/dnode2_stop.sim
#./test.sh -u -f unique/
stable
/dnode2_stop.sim
#./test.sh -u -f unique/
metrics
/dnode2.sim
#./test.sh -u -f unique/
stable
/dnode2.sim
#./test.sh -u -f unique/
metrics
/dnode3.sim
#./test.sh -u -f unique/
stable
/dnode3.sim
#./test.sh -u -f unique/
metrics
/replica2_dnode4.sim
#./test.sh -u -f unique/
stable
/replica2_dnode4.sim
#./test.sh -u -f unique/
metrics
/replica2_vnode3.sim
#./test.sh -u -f unique/
stable
/replica2_vnode3.sim
#./test.sh -u -f unique/
metrics
/replica3_dnode6.sim
#./test.sh -u -f unique/
stable
/replica3_dnode6.sim
#./test.sh -u -f unique/
metrics
/replica3_vnode3.sim
#./test.sh -u -f unique/
stable
/replica3_vnode3.sim
./test.sh -u -f unique/mnode/mgmt22.sim
./test.sh -u -f unique/mnode/mgmt22.sim
./test.sh -u -f unique/mnode/mgmt23.sim
./test.sh -u -f unique/mnode/mgmt23.sim
...
@@ -296,13 +297,9 @@ cd ../../../debug; make
...
@@ -296,13 +297,9 @@ cd ../../../debug; make
./test.sh -u -f unique/mnode/mgmt34.sim
./test.sh -u -f unique/mnode/mgmt34.sim
./test.sh -u -f unique/mnode/mgmtr2.sim
./test.sh -u -f unique/mnode/mgmtr2.sim
##./test.sh -u -f unique/table/delete_part.sim
./test.sh -u -f unique/vnode/many.sim
#./test.sh -u -f unique/vnode/commit.sim
#./test.sh -u -f unique/vnode/many.sim
#./test.sh -u -f unique/vnode/replica2_basic.sim
./test.sh -u -f unique/vnode/replica2_basic2.sim
./test.sh -u -f unique/vnode/replica2_basic2.sim
#
./test.sh -u -f unique/vnode/replica2_repeat.sim
./test.sh -u -f unique/vnode/replica2_repeat.sim
#hongze
./test.sh -u -f unique/vnode/replica3_basic.sim
./test.sh -u -f unique/vnode/replica3_basic.sim
#
./test.sh -u -f unique/vnode/replica3_repeat.sim
./test.sh -u -f unique/vnode/replica3_repeat.sim
#
./test.sh -u -f unique/vnode/replica3_vgroup.sim
./test.sh -u -f unique/vnode/replica3_vgroup.sim
tests/script/unique/db/delete.sim
浏览文件 @
e1e4a34a
...
@@ -34,13 +34,14 @@ while $i < 2000
...
@@ -34,13 +34,14 @@ while $i < 2000
$i = $i + 1
$i = $i + 1
endw
endw
sleep 2500
sql show db.vgroups
sql show db.vgroups
if $rows != 2 then
if $rows != 2 then
return -1
return -1
endi
endi
print ======== step2
print ======== step2
sleep 1000
sql drop database db
sql drop database db
sql show databases
sql show databases
if $rows != 0 then
if $rows != 0 then
...
...
tests/script/unique/db/delete_part.sim
浏览文件 @
e1e4a34a
...
@@ -45,27 +45,126 @@ begin:
...
@@ -45,27 +45,126 @@ begin:
sql create database $db
sql create database $db
sql use $db
sql use $db
$x = 0
sql create table t11 (ts timestamp, i int)
while $x < 32
sql insert into t11 values(now, 1 )
$tb = tb . $x
sql create table t12 (ts timestamp, i int)
sql create table $tb (ts timestamp, i int)
sql insert into t12 values(now, 1 )
sql insert into $tb values(now, $x )
sql create table t13 (ts timestamp, i int)
$x = $x + 1
sql insert into t13 values(now, 1 )
endw
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 )
sql create table t22 (ts timestamp, i int)
sql insert into t22 values(now, 1 )
sql create table t23 (ts timestamp, i int)
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 )
sql create table t32 (ts timestamp, i int)
sql insert into t32 values(now, 1 )
sql create table t33 (ts timestamp, i int)
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 )
sql create table t42 (ts timestamp, i int)
sql insert into t42 values(now, 1 )
sql create table t43 (ts timestamp, i int)
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 )
sql create table t52 (ts timestamp, i int)
sql insert into t52 values(now, 1 )
sql create table t53 (ts timestamp, i int)
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 )
sql create table t62 (ts timestamp, i int)
sql insert into t62 values(now, 1 )
sql create table t63 (ts timestamp, i int)
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 )
sql create table t72 (ts timestamp, i int)
sql insert into t72 values(now, 1 )
sql create table t73 (ts timestamp, i int)
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 )
sql create table t82 (ts timestamp, i int)
sql insert into t82 values(now, 1 )
sql create table t83 (ts timestamp, i int)
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
print dnode2 openVnodes $data2_2
if $data2_1 != 4 then
return -1
endi
if $data2_2 != 4 then
return -1
endi
print ======== step2 $loop
print ======== step2 $loop
system sh/exec_up.sh -n dnode2 -s stop
system sh/exec_up.sh -n dnode2 -s stop
sleep 1000
sleep 1000
print ==> drop database $db
sql drop database $db
sql drop database $db
print ======== step3 $loop
print ======== step3 $loop
sleep
3
000
sleep
2
000
system sh/exec_up.sh -n dnode2 -s start
system sh/exec_up.sh -n dnode2 -s start
sleep 5000
sleep 15000
sql show dnodes
print dnode1 openVnodes $data2_1 $data4_1
print dnode2 openVnodes $data2_2 $data4_2
if $data2_1 != 0 then
return -1
endi
if $data2_2 != 0 then
return -1
endi
if $data4_1 != ready then
return -1
endi
if $data4_2 != ready then
return -1
endi
print ===> test times : $loop
print ===> test times : $loop
if $loop >
5
then
if $loop >
3
then
return 0
return 0
endi
endi
...
...
tests/script/unique/db/replica_part.sim
浏览文件 @
e1e4a34a
...
@@ -7,9 +7,9 @@ system sh/deploy.sh -n dnode3 -i 3
...
@@ -7,9 +7,9 @@ system sh/deploy.sh -n dnode3 -i 3
system sh/cfg.sh -n dnode1 -c wallevel -v 2
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 dnode2 -c wallevel -v 2
system sh/cfg.sh -n dnode3 -c wallevel -v 2
system sh/cfg.sh -n dnode3 -c wallevel -v 2
system sh/cfg.sh -n dnode1 -c numOfMPeers -v
2
system sh/cfg.sh -n dnode1 -c numOfMPeers -v
1
system sh/cfg.sh -n dnode2 -c numOfMPeers -v
2
system sh/cfg.sh -n dnode2 -c numOfMPeers -v
1
system sh/cfg.sh -n dnode3 -c numOfMPeers -v
2
system sh/cfg.sh -n dnode3 -c numOfMPeers -v
1
system sh/cfg.sh -n dnode1 -c mgmtEqualVnodeNum -v 4
system sh/cfg.sh -n dnode1 -c mgmtEqualVnodeNum -v 4
system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 4
system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 4
system sh/cfg.sh -n dnode3 -c mgmtEqualVnodeNum -v 4
system sh/cfg.sh -n dnode3 -c mgmtEqualVnodeNum -v 4
...
...
tests/script/unique/http/opentsdb.sim
浏览文件 @
e1e4a34a
...
@@ -204,7 +204,7 @@ system_content curl -u root:taosdata -d '[{"metric": "sys_mem","timestamp": 134
...
@@ -204,7 +204,7 @@ system_content curl -u root:taosdata -d '[{"metric": "sys_mem","timestamp": 134
print $system_content
print $system_content
if $system_content != @{"failed":
1,"success":1
}@ then
if $system_content != @{"failed":
0,"success":2
}@ then
return -1
return -1
endi
endi
...
...
tests/script/unique/
metrics
/balance_replica1.sim
→
tests/script/unique/
stable
/balance_replica1.sim
浏览文件 @
e1e4a34a
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode2 -i 2
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
...
@@ -26,7 +23,7 @@ $totalNum = 200
...
@@ -26,7 +23,7 @@ $totalNum = 200
print ============== step1
print ============== step1
print ========= start dnode1
print ========= start dnode1
system sh/exec.sh -n dnode1 -s start
system sh/exec
_up
.sh -n dnode1 -s start
sql connect
sql connect
$i = 0
$i = 0
...
@@ -81,7 +78,7 @@ if $dnode2Vnodes != NULL then
...
@@ -81,7 +78,7 @@ if $dnode2Vnodes != NULL then
endi
endi
print =============== step3 start dnode2
print =============== step3 start dnode2
sql create dnode $hostname2
sql create dnode $hostname2
system sh/exec.sh -n dnode2 -s start
system sh/exec
_up
.sh -n dnode2 -s start
sleep 8000
sleep 8000
$x = 0
$x = 0
...
...
tests/script/unique/
metrics
/dnode2.sim
→
tests/script/unique/
stable
/dnode2.sim
浏览文件 @
e1e4a34a
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode2 -i 2
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c walLevel -v 0
...
@@ -10,12 +7,12 @@ system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
...
@@ -10,12 +7,12 @@ system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 4
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 dnode2 -c maxtablesPerVnode -v 4
system sh/exec.sh -n dnode1 -s start
system sh/exec
_up
.sh -n dnode1 -s start
sql connect
sql connect
sql create dnode $hostname2
sql create dnode $hostname2
system sh/exec.sh -n dnode2 -s start
system sh/exec
_up
.sh -n dnode2 -s start
$x = 0
$x = 0
createDnode:
createDnode:
...
@@ -25,7 +22,7 @@ createDnode:
...
@@ -25,7 +22,7 @@ createDnode:
return -1
return -1
endi
endi
sql show dnodes;
sql show dnodes;
if $data4_
192.168.0.
2 == offline then
if $data4_2 == offline then
goto createDnode
goto createDnode
endi
endi
...
...
tests/script/unique/
metrics
/dnode2_stop.sim
→
tests/script/unique/
stable
/dnode2_stop.sim
浏览文件 @
e1e4a34a
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode2 -i 2
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c walLevel -v 0
...
@@ -10,11 +7,11 @@ system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
...
@@ -10,11 +7,11 @@ system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 4
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 dnode2 -c maxtablesPerVnode -v 4
system sh/exec.sh -n dnode1 -s start
system sh/exec
_up
.sh -n dnode1 -s start
sql connect
sql connect
sql create dnode $hostname2
sql create dnode $hostname2
system sh/exec.sh -n dnode2 -s start
system sh/exec
_up
.sh -n dnode2 -s start
$x = 0
$x = 0
createDnode:
createDnode:
...
@@ -24,7 +21,7 @@ createDnode:
...
@@ -24,7 +21,7 @@ createDnode:
return -1
return -1
endi
endi
sql show dnodes;
sql show dnodes;
if $data4_
192.168.0.
2 == offline then
if $data4_2 == offline then
goto createDnode
goto createDnode
endi
endi
...
@@ -76,7 +73,7 @@ endi
...
@@ -76,7 +73,7 @@ endi
sleep 100
sleep 100
system sh/exec.sh -n dnode2 -s stop -x SIGINT
system sh/exec
_up
.sh -n dnode2 -s stop -x SIGINT
print =============== step2
print =============== step2
sql select count(*) from $mt -x step2
sql select count(*) from $mt -x step2
...
@@ -87,7 +84,7 @@ sql select count(tbcol) from $mt -x step21
...
@@ -87,7 +84,7 @@ sql select count(tbcol) from $mt -x step21
return -1
return -1
step21:
step21:
system sh/exec.sh -n dnode2 -s start
system sh/exec
_up
.sh -n dnode2 -s start
sleep 10000
sleep 10000
print =============== step3
print =============== step3
...
...
tests/script/unique/
metrics
/dnode3.sim
→
tests/script/unique/
stable
/dnode3.sim
浏览文件 @
e1e4a34a
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode3 -i 3
system sh/deploy.sh -n dnode3 -i 3
...
@@ -15,14 +11,14 @@ system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4
...
@@ -15,14 +11,14 @@ system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 4
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 dnode2 -c maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode3 -c maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode3 -c maxtablesPerVnode -v 4
system sh/exec.sh -n dnode1 -s start
system sh/exec
_up
.sh -n dnode1 -s start
sql connect
sql connect
sql create dnode $hostname2
sql create dnode $hostname2
system sh/exec.sh -n dnode2 -s start
system sh/exec
_up
.sh -n dnode2 -s start
sql create dnode $hostname3
sql create dnode $hostname3
system sh/exec.sh -n dnode3 -s start
system sh/exec
_up
.sh -n dnode3 -s start
$x = 0
$x = 0
createDnode:
createDnode:
...
@@ -32,10 +28,10 @@ createDnode:
...
@@ -32,10 +28,10 @@ createDnode:
return -1
return -1
endi
endi
sql show dnodes;
sql show dnodes;
if $data4_
192.168.0.
2 == offline then
if $data4_2 == offline then
goto createDnode
goto createDnode
endi
endi
if $data4_
192.168.0.
3 == offline then
if $data4_3 == offline then
goto createDnode
goto createDnode
endi
endi
...
...
tests/script/unique/
metrics
/replica2_dnode4.sim
→
tests/script/unique/
stable
/replica2_dnode4.sim
浏览文件 @
e1e4a34a
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode3 -i 3
system sh/deploy.sh -n dnode3 -i 3
...
@@ -20,16 +15,16 @@ system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 4
...
@@ -20,16 +15,16 @@ 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 dnode2 -c maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode3 -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 dnode4 -c maxtablesPerVnode -v 4
system sh/exec.sh -n dnode1 -s start
system sh/exec
_up
.sh -n dnode1 -s start
sql connect
sql connect
sql create dnode $hostname2
sql create dnode $hostname2
sql create dnode $hostname3
sql create dnode $hostname3
sql create dnode $hostname4
sql create dnode $hostname4
system sh/exec.sh -n dnode2 -s start
system sh/exec
_up
.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start
system sh/exec
_up
.sh -n dnode3 -s start
system sh/exec.sh -n dnode4 -s start
system sh/exec
_up
.sh -n dnode4 -s start
$x = 0
$x = 0
createDnode:
createDnode:
...
@@ -39,13 +34,13 @@ createDnode:
...
@@ -39,13 +34,13 @@ createDnode:
return -1
return -1
endi
endi
sql show dnodes;
sql show dnodes;
if $data4_
192.168.0.
2 == offline then
if $data4_2 == offline then
goto createDnode
goto createDnode
endi
endi
if $data4_
192.168.0.
3 == offline then
if $data4_3 == offline then
goto createDnode
goto createDnode
endi
endi
if $data4_
192.168.0.
4 == offline then
if $data4_4 == offline then
goto createDnode
goto createDnode
endi
endi
...
...
tests/script/unique/
metrics
/replica2_vnode3.sim
→
tests/script/unique/
stable
/replica2_vnode3.sim
浏览文件 @
e1e4a34a
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode2 -i 2
system sh/cfg.sh -n dnode1 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c walLevel -v 0
...
@@ -10,11 +7,11 @@ system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
...
@@ -10,11 +7,11 @@ system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 4
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 dnode2 -c maxtablesPerVnode -v 4
system sh/exec.sh -n dnode1 -s start
system sh/exec
_up
.sh -n dnode1 -s start
sql connect
sql connect
sql create dnode $hostname2
sql create dnode $hostname2
system sh/exec.sh -n dnode2 -s start
system sh/exec
_up
.sh -n dnode2 -s start
$x = 0
$x = 0
createDnode:
createDnode:
...
@@ -24,7 +21,7 @@ createDnode:
...
@@ -24,7 +21,7 @@ createDnode:
return -1
return -1
endi
endi
sql show dnodes;
sql show dnodes;
if $data4_
192.168.0.
2 == offline then
if $data4_2 == offline then
goto createDnode
goto createDnode
endi
endi
...
...
tests/script/unique/
metrics
/replica3_dnode6.sim
→
tests/script/unique/
stable
/replica3_dnode6.sim
浏览文件 @
e1e4a34a
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode3 -i 3
system sh/deploy.sh -n dnode3 -i 3
...
@@ -35,7 +27,7 @@ system sh/cfg.sh -n dnode4 -c maxtablesPerVnode -v 4
...
@@ -35,7 +27,7 @@ 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 dnode5 -c maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode6 -c maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode6 -c maxtablesPerVnode -v 4
system sh/exec.sh -n dnode1 -s start
system sh/exec
_up
.sh -n dnode1 -s start
sql connect
sql connect
sql create dnode $hostname2
sql create dnode $hostname2
...
@@ -43,11 +35,11 @@ sql create dnode $hostname3
...
@@ -43,11 +35,11 @@ sql create dnode $hostname3
sql create dnode $hostname4
sql create dnode $hostname4
sql create dnode $hostname5
sql create dnode $hostname5
sql create dnode $hostname6
sql create dnode $hostname6
system sh/exec.sh -n dnode2 -s start
system sh/exec
_up
.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start
system sh/exec
_up
.sh -n dnode3 -s start
system sh/exec.sh -n dnode4 -s start
system sh/exec
_up
.sh -n dnode4 -s start
system sh/exec.sh -n dnode5 -s start
system sh/exec
_up
.sh -n dnode5 -s start
system sh/exec.sh -n dnode6 -s start
system sh/exec
_up
.sh -n dnode6 -s start
$x = 0
$x = 0
createDnode:
createDnode:
...
@@ -57,19 +49,19 @@ createDnode:
...
@@ -57,19 +49,19 @@ createDnode:
return -1
return -1
endi
endi
sql show dnodes;
sql show dnodes;
if $data4_
192.168.0.
2 == offline then
if $data4_2 == offline then
goto createDnode
goto createDnode
endi
endi
if $data4_
192.168.0.
3 == offline then
if $data4_3 == offline then
goto createDnode
goto createDnode
endi
endi
if $data4_
192.168.0.
4 == offline then
if $data4_4 == offline then
goto createDnode
goto createDnode
endi
endi
if $data4_
192.168.0.
5 == offline then
if $data4_5 == offline then
goto createDnode
goto createDnode
endi
endi
if $data4_
192.168.0.
6 == offline then
if $data4_6 == offline then
goto createDnode
goto createDnode
endi
endi
...
...
tests/script/unique/
metrics
/replica3_vnode3.sim
→
tests/script/unique/
stable
/replica3_vnode3.sim
浏览文件 @
e1e4a34a
system sh/stop_dnodes.sh
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode3 -i 3
system sh/deploy.sh -n dnode3 -i 3
...
@@ -20,16 +16,16 @@ system sh/cfg.sh -n dnode1 -c maxtablesPerVnode -v 4
...
@@ -20,16 +16,16 @@ 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 dnode2 -c maxtablesPerVnode -v 4
system sh/cfg.sh -n dnode3 -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 dnode4 -c maxtablesPerVnode -v 4
system sh/exec.sh -n dnode1 -s start
system sh/exec
_up
.sh -n dnode1 -s start
sql connect
sql connect
sql create dnode $hostname2
sql create dnode $hostname2
sql create dnode $hostname3
sql create dnode $hostname3
sql create dnode $hostname4
sql create dnode $hostname4
system sh/exec.sh -n dnode2 -s start
system sh/exec
_up
.sh -n dnode2 -s start
system sh/exec.sh -n dnode3 -s start
system sh/exec
_up
.sh -n dnode3 -s start
system sh/exec.sh -n dnode4 -s start
system sh/exec
_up
.sh -n dnode4 -s start
$x = 0
$x = 0
createDnode:
createDnode:
$x = $x + 1
$x = $x + 1
...
@@ -38,13 +34,13 @@ createDnode:
...
@@ -38,13 +34,13 @@ createDnode:
return -1
return -1
endi
endi
sql show dnodes;
sql show dnodes;
if $data4_
192.168.0.
2 == offline then
if $data4_2 == offline then
goto createDnode
goto createDnode
endi
endi
if $data4_
192.168.0.
3 == offline then
if $data4_3 == offline then
goto createDnode
goto createDnode
endi
endi
if $data4_
192.168.0.
4 == offline then
if $data4_4 == offline then
goto createDnode
goto createDnode
endi
endi
...
@@ -144,6 +140,7 @@ if $rows != 5 then
...
@@ -144,6 +140,7 @@ if $rows != 5 then
endi
endi
print =============== step7
print =============== step7
print select count(*) from $mt
sql select count(*) from $mt
sql select count(*) from $mt
print ===> $data00
print ===> $data00
if $data00 != $totalNum then
if $data00 != $totalNum then
...
@@ -208,7 +205,7 @@ endi
...
@@ -208,7 +205,7 @@ endi
if $rows != 50 then
if $rows != 50 then
return -1
return -1
endi
endi
return
print =============== clear
print =============== clear
sql drop database $db
sql drop database $db
sql show databases
sql show databases
...
...
tests/script/unique/
metrics
/testSuite.sim
→
tests/script/unique/
stable
/testSuite.sim
浏览文件 @
e1e4a34a
文件已移动
tests/script/unique/table/back_insert.sim
已删除
100644 → 0
浏览文件 @
d299208f
sql connect
$x = 1
begin:
sql insert into db.tb values(now, $x ) -x begin
#print ===> insert successed $x
$x = $x + 1
goto begin
\ No newline at end of file
tests/script/unique/table/delete_part.sim
已删除
100644 → 0
浏览文件 @
d299208f
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 0
system sh/cfg.sh -n dnode2 -c walLevel -v 0
system sh/cfg.sh -n dnode3 -c walLevel -v 0
system sh/cfg.sh -n dnode4 -c walLevel -v 0
system sh/cfg.sh -n dnode1 -c numOfMPeers -v 1
system sh/cfg.sh -n dnode2 -c numOfMPeers -v 1
system sh/cfg.sh -n dnode3 -c numOfMPeers -v 1
system sh/cfg.sh -n dnode4 -c numOfMPeers -v 1
system sh/cfg.sh -n dnode1 -c mgmtEqualVnodeNum -v 4
system sh/cfg.sh -n dnode2 -c mgmtEqualVnodeNum -v 4
system sh/cfg.sh -n dnode3 -c mgmtEqualVnodeNum -v 4
system sh/cfg.sh -n dnode4 -c mgmtEqualVnodeNum -v 4
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 4
system sh/cfg.sh -n dnode4 -c numOfTotalVnodes -v 4
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
print ========= start dnodes
system sh/exec.sh -n dnode1 -s start
sql connect
sql create dnode $hostname2
system sh/exec.sh -n dnode2 -s start
sleep 3000
sql create database dpdb
sql use dpdb
$loop = 0
begin:
print ======== step1
$x = 0
while $x < 16
$tb = tb . $x
sql create table $tb (ts timestamp, i int)
sql insert into $tb values(now, $x )
$x = $x + 1
endw
print ======== step2
system sh/exec.sh -n dnode2 -s stop
$x = 0
while $x < 16
$tb = tb . $x
sql drop table $tb
$x = $x + 1
endw
print ======== step3
sleep 2000
system sh/exec.sh -n dnode2 -s start
sleep 3000
print ===> test times : $loop
if $loop > 20 then
return 0
endi
$loop = $loop + 1
goto begin
system sh/exec_up.sh -n dnode1 -s stop -x SIGINT
system sh/exec_up.sh -n dnode2 -s stop -x SIGINT
system sh/exec_up.sh -n dnode3 -s stop -x SIGINT
system sh/exec_up.sh -n dnode4 -s stop -x SIGINT
system sh/exec_up.sh -n dnode5 -s stop -x SIGINT
system sh/exec_up.sh -n dnode6 -s stop -x SIGINT
system sh/exec_up.sh -n dnode7 -s stop -x SIGINT
system sh/exec_up.sh -n dnode8 -s stop -x SIGINT
\ No newline at end of file
tests/script/unique/table/testSuite.sim
已删除
100644 → 0
浏览文件 @
d299208f
run unique/table/delete_part.sim
tests/script/unique/testSuite.sim
已删除
100644 → 0
浏览文件 @
d299208f
#################################
run unique/mnode/testSuite.sim
##################################
tests/script/unique/vnode/commit.sim
已删除
100644 → 0
浏览文件 @
d299208f
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 wallevel -v 2
system sh/cfg.sh -n dnode2 -c wallevel -v 2
system sh/cfg.sh -n dnode1 -c numofMpeers -v 3
system sh/cfg.sh -n dnode2 -c numofMpeers -v 3
system sh/exec_up.sh -n dnode1 -s start
sql connect
sql create dnode $hostname2
system sh/exec_up.sh -n dnode2 -s start
sleep 3000
print =================== step 1 create db
sql create database c2db replica 2 days 10 keep 50
sql use c2db
sql create table tb (ts timestamp, speed int)
sql insert into tb values(now, 0)
print =================== step2 sleep 2000 and kill dnode2(SIGINT)
sleep 2000
system sh/exec_up.sh -n dnode2 -s stop -x SIGINT
sleep 1000
print =================== step3 insert into dnode1
$x = 1
while $x < 100
$time = $x . m
sql insert into tb values (now + $time , $x )
$x = $x + 1
endw
$x = 240
while $x < 400
$time = $x . m
sql insert into tb values (now + $time , $x )
$x = $x + 1
endw
$x = 480
while $x < 700
$time = $x . m
sql insert into tb values (now + $time , $x )
$x = $x + 1
endw
$x = 720
while $x < 809
$time = $x . m
sql insert into tb values (now + $time , $x )
$x = $x + 1
endw
$x = 960
while $x < 1043
$time = $x . m
sql insert into tb values (now + $time , $x )
$x = $x + 1
endw
$x = 1200
while $x < 1244
$time = $x . m
sql insert into tb values (now + $time , $x )
$x = $x + 1
endw
$x = 1440
while $x < 1677
$time = $x . m
sql insert into tb values (now + $time , $x )
$x = $x + 1
endw
$x = 1680
while $x < 1683
$time = $x . m
sql insert into tb values (now + $time , $x )
$x = $x + 1
endw
print =================== step4
sql select count(*) from tb
print select count(*) from tb ==> $data00 (expect 936)
if $data00 != 936 then
return -1
endi
sql select * from tb order by ts desc
print select * from tb ==> $data00 $data01 $rows
if $data01 != 1682 then
return -1
endi
if $rows != 936 then
return -1
endi
print =================== step5 sleep kill dnode1(SIGINT) then start dnode1
system sh/exec_up.sh -n dnode1 -s stop -x SIGINT
sleep 5000
system sh/exec_up.sh -n dnode1 -s start
sleep 3000
print =================== step6 start dnode2 and sleep 10000 (wait sync complete)
system sh/exec_up.sh -n dnode2 -s start
sleep 12000
print =================== step7
sql_error insert into tb values(now + 1000h, 100)
sql select count(*) from tb order by ts desc
print select count(*) from tb ==> $data00 (expect <= 936)
if $data00 != 936 then
return -1
endi
$remainRows = $data00
sql select * from tb order by ts desc
print select * from tb ==> $data00 $data01 $data10 $data11 $rows
if $data11 != 1681 then
return -1
endi
if $rows != $remainRows then
return -1
endi
print =================== step8 kill dnode1(SIGINT) and query
system sh/exec_up.sh -n dnode1 -s stop -x SIGINT
sleep 2000
print =================== step9
sql select count(*) from tb order by ts desc
print select count(*) from tb ==> $data00 (expect == $remainRows )
if $data00 > $remainRows then
return -1
endi
if $data00 <= 0 then
return -1
endi
$remainRows = $data00
sql select * from tb order by ts desc
print select * from tb ==> $data00 $data01 $rows
if $rows != $remainRows then
return -1
endi
system sh/exec_up.sh -n dnode1 -s stop -x SIGINT
system sh/exec_up.sh -n dnode2 -s stop -x SIGINT
system sh/exec_up.sh -n dnode3 -s stop -x SIGINT
system sh/exec_up.sh -n dnode4 -s stop -x SIGINT
system sh/exec_up.sh -n dnode5 -s stop -x SIGINT
system sh/exec_up.sh -n dnode6 -s stop -x SIGINT
system sh/exec_up.sh -n dnode7 -s stop -x SIGINT
system sh/exec_up.sh -n dnode8 -s stop -x SIGINT
tests/script/unique/vnode/many.sim
浏览文件 @
e1e4a34a
...
@@ -53,27 +53,27 @@ sql select count(*) from db4.tb4
...
@@ -53,27 +53,27 @@ sql select count(*) from db4.tb4
$lastRows4 = $rows
$lastRows4 = $rows
print ======== step2
print ======== step2
run_back
cluster
/vnode/back_insert_many.sim
run_back
unique
/vnode/back_insert_many.sim
sleep 5000
sleep 5000
print ======== step3
print ======== step3
system sh/exec_up.sh -n dnode2 -s stop
system sh/exec_up.sh -n dnode2 -s stop
sleep
10
000
sleep
5
000
$x = 0
$x = 0
loop:
loop:
print ======== step4
print ======== step4
system sh/exec_up.sh -n dnode2 -s start
system sh/exec_up.sh -n dnode2 -s start
sleep
10
000
sleep
5
000
system sh/exec_up.sh -n dnode3 -s stop
system sh/exec_up.sh -n dnode3 -s stop
sleep
10
000
sleep
5
000
print ======== step5
print ======== step5
system sh/exec_up.sh -n dnode3 -s start
system sh/exec_up.sh -n dnode3 -s start
sleep
10
000
sleep
5
000
system sh/exec_up.sh -n dnode2 -s stop
system sh/exec_up.sh -n dnode2 -s stop
sleep
10
000
sleep
5
000
print ======== step6
print ======== step6
sql select count(*) from db1.tb1
sql select count(*) from db1.tb1
...
@@ -108,7 +108,7 @@ print ======== step7
...
@@ -108,7 +108,7 @@ print ======== step7
print ======== loop Times $x
print ======== loop Times $x
if $x <
5
then
if $x <
2
then
$x = $x + 1
$x = $x + 1
goto loop
goto loop
endi
endi
...
...
tests/script/unique/vnode/replica2_basic.sim
已删除
100644 → 0
浏览文件 @
d299208f
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 wallevel -v 2
system sh/cfg.sh -n dnode2 -c wallevel -v 2
system sh/cfg.sh -n dnode1 -c numofMpeers -v 3
system sh/cfg.sh -n dnode2 -c numofMpeers -v 3
system sh/exec_up.sh -n dnode1 -s start
sql connect
sql create dnode $hostname2
system sh/exec_up.sh -n dnode2 -s start
sleep 3000
$N = 10
$db = d1
$table = table_r2
print =================== step 1
sql create database $db replica 3
sql use $db
sql create table $table (ts timestamp, speed int) -x error_create
return -1
error_create:
sql drop database $db
print =================== step 2
sql create database $db replica 2
sql use $db
sql create table $table (ts timestamp, speed int)
sleep 1000
print =================== step 3
$x = 1
$y = $x + $N
$expect = $N
while $x < $y
$ms = $x . m
sql insert into $table values (now + $ms , $x )
$x = $x + 1
endw
sql select * from $table
print sql select * from $table -> $rows points
if $rows != $expect then
return -1
endi
print =================== step 4
system sh/exec_up.sh -n dnode2 -s stop
sleep 2000
$y = $x + $N
$expect = $N * 2
while $x < $y
$ms = $x . m
sql insert into $table values (now + $ms , $x )
$x = $x + 1
endw
sql select * from $table
print sql select * from $table -> $rows points
if $rows != $expect then
return -1
endi
print =================== step 5
system sh/exec_up.sh -n dnode2 -s start
sleep 2000
$y = $x + $N
$expect = $N * 3
while $x < $y
$ms = $x . m
sql insert into $table values (now + $ms , $x )
$x = $x + 1
endw
sql select * from $table
print sql select * from $table -> $rows points
if $rows != $expect then
return -1
endi
print =================== step 6
system sh/exec_up.sh -n dnode1 -s stop
sleep 2000
$y = $x + $N
$expect = $N * 4
while $x < $y
$ms = $x . m
sql insert into $table values (now + $ms , $x )
$x = $x + 1
endw
sql select * from $table
print sql select * from $table -> $rows points
if $rows != $expect then
return -1
endi
print =================== step 7
system sh/exec_up.sh -n dnode1 -s start
sleep 2000
$y = $x + $N
$expect = $N * 5
while $x < $y
$ms = $x . m
sql insert into $table values (now + $ms , $x )
$x = $x + 1
endw
sql select * from $table
print sql select * from $table -> $rows points
if $rows != $expect then
return -1
endi
print =================== step 8
system sh/ip.sh -i 1 -s down
sleep 2000
$y = $x + $N
$expect = $N * 6
while $x < $y
$ms = $x . m
sql insert into $table values (now + $ms , $x )
$x = $x + 1
endw
sql select * from $table
print sql select * from $table -> $rows points
if $rows != $expect then
return -1
endi
print =================== step 9
sleep 2000
$y = $x + $N
$expect = $N * 7
while $x < $y
$ms = $x . m
sql insert into $table values (now + $ms , $x )
$x = $x + 1
endw
sql select * from $table
print sql select * from $table -> $rows points
if $rows != $expect then
return -1
endi
print =================== step 10
system sh/ip.sh -i 2 -s down
sleep 2000
$y = $x + $N
$expect = $N * 8
while $x < $y
$ms = $x . m
sql insert into $table values (now + $ms , $x )
$x = $x + 1
endw
sql select * from $table
print sql select * from $table -> $rows points
if $rows != $expect then
return -1
endi
print =================== step 11
sleep 2000
$y = $x + $N
$expect = $N * 9
while $x < $y
$ms = $x . m
sql insert into $table values (now + $ms , $x )
$x = $x + 1
endw
sql select * from $table
print sql select * from $table -> $rows points
if $rows != $expect then
return -1
endi
print =================== step 12
system sh/exec_up.sh -n dnode1 -s stop -x SIGINT
system sh/exec_up.sh -n dnode2 -s stop -x SIGINT
system sh/exec_up.sh -n dnode3 -s stop -x SIGINT
system sh/exec_up.sh -n dnode4 -s stop -x SIGINT
system sh/exec_up.sh -n dnode5 -s stop -x SIGINT
system sh/exec_up.sh -n dnode6 -s stop -x SIGINT
system sh/exec_up.sh -n dnode7 -s stop -x SIGINT
system sh/exec_up.sh -n dnode8 -s stop -x SIGINT
\ No newline at end of file
tests/script/unique/vnode/replica2_repeat.sim
浏览文件 @
e1e4a34a
...
@@ -33,7 +33,7 @@ sql select count(*) from db.tb
...
@@ -33,7 +33,7 @@ sql select count(*) from db.tb
$lastRows = $rows
$lastRows = $rows
print ======== step2
print ======== step2
run_back
cluster
/vnode/back_insert.sim
run_back
unique
/vnode/back_insert.sim
sleep 3000
sleep 3000
print ======== step3
print ======== step3
...
@@ -66,7 +66,7 @@ print ======== step7
...
@@ -66,7 +66,7 @@ print ======== step7
$lastRows = $data00
$lastRows = $data00
print ======== loop Times $x
print ======== loop Times $x
if $x <
5
then
if $x <
2
then
$x = $x + 1
$x = $x + 1
goto loop
goto loop
endi
endi
...
...
tests/script/unique/vnode/replica3_repeat.sim
浏览文件 @
e1e4a34a
...
@@ -36,7 +36,7 @@ sql select count(*) from db.tb
...
@@ -36,7 +36,7 @@ sql select count(*) from db.tb
$lastRows = $rows
$lastRows = $rows
print ======== step2
print ======== step2
run_back
cluster
/vnode/back_insert.sim
run_back
unique
/vnode/back_insert.sim
sleep 3000
sleep 3000
print ======== step3
print ======== step3
...
@@ -75,7 +75,7 @@ print ======== step8
...
@@ -75,7 +75,7 @@ print ======== step8
$lastRows = $data00
$lastRows = $data00
print ======== loop Times $x
print ======== loop Times $x
if $x <
5
then
if $x <
2
then
$x = $x + 1
$x = $x + 1
goto loop
goto loop
endi
endi
...
...
tests/script/unique/vnode/replica3_vgroup.sim
浏览文件 @
e1e4a34a
...
@@ -33,7 +33,7 @@ sleep 3001
...
@@ -33,7 +33,7 @@ sleep 3001
$tbPre = m
$tbPre = m
$N =
28
0
$N =
30
0
$x = 0
$x = 0
$y = $x + $N
$y = $x + $N
while $x < $y
while $x < $y
...
@@ -46,20 +46,20 @@ endw
...
@@ -46,20 +46,20 @@ endw
#print =================== step 2
#print =================== step 2
#$x = 1
$x = -500
#$y = $x + $N
$y = $x + $N
#$expect = $N
while $x < $y
#while $x < $y
$ms = $x . m
# $ms = $x . m
sql insert into $table values (now $ms , $x )
# sql insert into $table values (now + $ms , $x )
$x = $x + 1
# $x = $x + 1
endw
#endw
#sql select * from $table
$expect = $N + 1
#print sql select * from $table -> $rows points
sql select * from $table
#if $rows != $expect then
print sql select * from $table -> $rows points expect $expect
# return -1
if $rows != $expect then
#endi
return -1
endi
system sh/exec_up.sh -n dnode1 -s stop -x SIGINT
system sh/exec_up.sh -n dnode1 -s stop -x SIGINT
system sh/exec_up.sh -n dnode2 -s stop -x SIGINT
system sh/exec_up.sh -n dnode2 -s stop -x SIGINT
...
...
tests/script/unique/vnode/testSuite.sim
浏览文件 @
e1e4a34a
run unique/vnode/commit.sim
run unique/vnode/many.sim
run unique/vnode/many.sim
run unique/vnode/replica2_basic.sim
run unique/vnode/replica2_basic2.sim
run unique/vnode/replica2_basic2.sim
run unique/vnode/replica2_repeat.sim
run unique/vnode/replica2_repeat.sim
run unique/vnode/replica3_basic.sim
run unique/vnode/replica3_basic.sim
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录