Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
CSDN产品汪
TDengine
提交
26ff7482
T
TDengine
项目概览
CSDN产品汪
/
TDengine
与 Fork 源项目一致
Fork自
taosdata / TDengine
通知
5
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
TDengine
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
26ff7482
编写于
7月 29, 2020
作者:
S
Shengliang Guan
提交者:
GitHub
7月 29, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #2804 from taosdata/hotfix/test
[modify cases]
上级
c6286e6d
966b4736
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
47 addition
and
38 deletion
+47
-38
tests/script/unique/clusterSimCase/client-06.sim
tests/script/unique/clusterSimCase/client-06.sim
+2
-8
tests/script/unique/clusterSimCase/client-07.sim
tests/script/unique/clusterSimCase/client-07.sim
+27
-14
tests/script/unique/clusterSimCase/client-08.sim
tests/script/unique/clusterSimCase/client-08.sim
+16
-14
tests/script/unique/clusterSimCase/cluster_main.sim
tests/script/unique/clusterSimCase/cluster_main.sim
+2
-2
未找到文件。
tests/script/unique/clusterSimCase/client-06.sim
浏览文件 @
26ff7482
...
...
@@ -9,8 +9,6 @@ $tsStart = 1325347200000 # 2012-01-01 00:00:00.000
$preBinary = ' . client-06-
$numPerUpdateTbl = 2000
###############################################################
$testCnt = 0
$totalRows = 0
$dropTblStart = $tblStart
$dropTblEnd = $dropTblStart
...
...
@@ -23,7 +21,7 @@ sql create database if not exists $db replica 2
sql use $db
init_lable:
print ================ create table
$tb
[ from $tblStart to $tblEnd ] (ts timestamp, c1 int, c2 binary(16))
print ================ create table [ from $tblStart to $tblEnd ] (ts timestamp, c1 int, c2 binary(16))
$i = $tblStart
while $i < $tblEnd
...
...
@@ -90,12 +88,8 @@ if $loopCnt > 2 then
$i = $i + 1
$totalRows = $totalRows - $rowsPerTbl
endw
sleep 20000
$testCnt = $testCnt + 1
sleep 10000
goto init_lable
endi
if $testCnt > 10 then
return 0
endi
goto loop_run
tests/script/unique/clusterSimCase/client-07.sim
浏览文件 @
26ff7482
...
...
@@ -7,6 +7,10 @@ $tblEnd = 10000
$tsStart = 1325347200000 # 2012-01-01 00:00:00.000
$preBinary = ' . client-07-
###############################################################
$alterCnt = 0
$columnA = c . $alterCnt
$columnB = d . $alterCnt
$totalRows = 0
...
...
@@ -17,22 +21,23 @@ $db = db
sql create database if not exists $db replica 2
sql use $db
init_lable:
print ================ create table $tb (ts timestamp, c1 int, c2 binary(16))
$rowsPerTbl = 0
$ts = $tsStart
print ================ create table $tb (ts timestamp, $columnA int, $columnB binary(16))
$i = $tblStart
while $i < $tblEnd
$tb = tb . $i
# print create table if not exists $tb ( ts timestamp , c1 int , c2 binary(16) )
sql create table if not exists $tb ( ts timestamp ,
c1 int , c2
binary(16) )
sql create table if not exists $tb ( ts timestamp ,
$columnA int , $columnB
binary(16) )
$i = $i + 1
endw
$rowsPerTbl = 0
$ts = $tsStart
$rowsPerLoop = 160
$loopCnt = 0
$alterStep = 0
loop_run:
print ================ client-07 start loop insert data ( loopCnt: $loopCnt )
...
...
@@ -70,19 +75,27 @@ endi
$loopCnt = $loopCnt + 1
if $loopCnt > 100 then
if $alterStep > 2 then
$alterStep = 0
$alterCnt = $alterCnt + 1
$i = $tblStart
while $i < $tblEnd
$tb = tb . $i
sql alter table $tb add column c3 double
sql alter table $tb add column c4 binary( 16 )
sql alter table $tb drop column c1
sql alter table $tb drop column c2
$newColumnA = c . $alterCnt
$newcolumnB = d . $alterCnt
sql alter table $tb add column $newColumnA double
sql alter table $tb add column $newcolumnB binary( 16 )
sql alter table $tb drop column $columnA
sql alter table $tb drop column $columnB
$i = $i + 1
endw
sleep 20000
goto init_lable
endw
$columnA = $newColumnA
$columnB = $newcolumnB
sleep 10000
goto loop_run
endi
goto loop_run
tests/script/unique/clusterSimCase/client-08.sim
浏览文件 @
26ff7482
...
...
@@ -4,13 +4,14 @@
###############################################################
################ set script parameters ################
$tblStart = 0
$tblEnd = 100
00
$tblEnd = 100
$tsStart = 1325347200000 # 2012-01-01 00:00:00.000
$preBinary = ' . client-08-
$numPerUpdateTbl = 20
00
$numPerUpdateTbl = 20
###############################################################
$totalRows = 0
$totalRows = 0
$dropTblStart = $tblStart
$dropTblEnd = $dropTblStart
sql connect
...
...
@@ -20,7 +21,7 @@ sql create database if not exists $db replica 2
sql use $db
init_lable:
print ================ create table
$tb
(ts timestamp, c1 int, c2 binary(16))
print ================ create table
[ from $tblStart to $tblEnd ]
(ts timestamp, c1 int, c2 binary(16))
$i = $tblStart
while $i < $tblEnd
...
...
@@ -30,8 +31,8 @@ while $i < $tblEnd
$i = $i + 1
endw
$dropTblStart = $
tblStart
$dropTblEnd
= $t
blStart + $numPerUpdateTbl
$dropTblStart = $
dropTblEnd
$dropTblEnd
= $dropT
blStart + $numPerUpdateTbl
$tblStart = $tblEnd
$tblEnd = $tblEnd + $numPerUpdateTbl
...
...
@@ -43,9 +44,9 @@ $rowsPerLoop = 40
$loopCnt = 0
loop_run:
print ================ client-08 start loop insert data ( loopCnt: $loopCnt )
$i
= $dropTblStart
while $i < $tbl
End
print ================ client-08 start loop insert data
from $dropTblStart to $tblStart
( loopCnt: $loopCnt )
$i = $dropTblStart
while $i < $tbl
Start
$tb = tb . $i
$c2Binary = $preBinary . $i
...
...
@@ -58,7 +59,7 @@ while $i < $tblEnd
$x = $x + 40
$ts = $ts + 40a
endw
if $i == $
t
blStart then
if $i == $
dropT
blStart then
$rowsPerTbl = $rowsPerTbl + $x
endi
...
...
@@ -68,7 +69,7 @@ while $i < $tblEnd
endw
sql select count(*) from $tb
print data00 $data00 rowsPerTbl $rowsPerTbl
print data00 $data00 rowsPerTbl $rowsPerTbl
tb: $tb
if $data00 != $rowsPerTbl then
print ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
print ************ client-08 insert data into $tb error ***** *****
...
...
@@ -78,7 +79,8 @@ endi
$loopCnt = $loopCnt + 1
#if $loopCnt > 100 then
#if $loopCnt > 3 then
print ================ client-08 drop table from $dropTblStart to $dropTblEnd
$i = $dropTblStart
while $i < $dropTblEnd
$tb = tb . $i
...
...
@@ -86,7 +88,7 @@ $loopCnt = $loopCnt + 1
$i = $i + 1
$totalRows = $totalRows - $rowsPerTbl
endw
sleep
2
0000
sleep
1
0000
goto init_lable
#endi
...
...
tests/script/unique/clusterSimCase/cluster_main.sim
浏览文件 @
26ff7482
...
...
@@ -94,11 +94,11 @@ print ============== step3: start back client-01.sim
#run_back unique/clusterSimCase/client-01.sim
#run_back unique/clusterSimCase/client-02.sim
#run_back unique/clusterSimCase/client-03.sim
run_back unique/clusterSimCase/client-04.sim
#
run_back unique/clusterSimCase/client-04.sim
#run_back unique/clusterSimCase/client-05.sim
#run_back unique/clusterSimCase/client-06.sim
#run_back unique/clusterSimCase/client-07.sim
#
run_back unique/clusterSimCase/client-08.sim
run_back unique/clusterSimCase/client-08.sim
#run_back unique/clusterSimCase/client-01.sim
#run_back unique/clusterSimCase/client-01.sim
sleep 20000
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录