未验证 提交 26ff7482 编写于 作者: S Shengliang Guan 提交者: GitHub

Merge pull request #2804 from taosdata/hotfix/test

[modify cases]
......@@ -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
......@@ -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
......@@ -4,13 +4,14 @@
###############################################################
################ set script parameters ################
$tblStart = 0
$tblEnd = 10000
$tblEnd = 100
$tsStart = 1325347200000 # 2012-01-01 00:00:00.000
$preBinary = ' . client-08-
$numPerUpdateTbl = 2000
$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 = $tblStart + $numPerUpdateTbl
$dropTblStart = $dropTblEnd
$dropTblEnd = $dropTblStart + $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 < $tblEnd
print ================ client-08 start loop insert data from $dropTblStart to $tblStart ( loopCnt: $loopCnt )
$i = $dropTblStart
while $i < $tblStart
$tb = tb . $i
$c2Binary = $preBinary . $i
......@@ -58,7 +59,7 @@ while $i < $tblEnd
$x = $x + 40
$ts = $ts + 40a
endw
if $i == $tblStart then
if $i == $dropTblStart 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 20000
sleep 10000
goto init_lable
#endi
......
......@@ -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.
先完成此消息的编辑!
想要评论请 注册