提交 dc4e5e61 编写于 作者: S Shengliang Guan

test: restore some 2.0 case

上级 91a59257
run general/insert/basic.sim
run general/insert/insert_drop.sim
run general/insert/query_block1_memory.sim
run general/insert/query_block2_memory.sim
run general/insert/query_block1_file.sim
run general/insert/query_block2_file.sim
run general/insert/query_file_memory.sim
run general/insert/query_multi_file.sim
run general/insert/tcp.sim
...@@ -52,13 +52,22 @@ ...@@ -52,13 +52,22 @@
./test.sh -f tsim/import/replica1.sim ./test.sh -f tsim/import/replica1.sim
# ---- insert # ---- insert
./test.sh -f tsim/insert/backquote.sim
./test.sh -f tsim/insert/basic.sim
./test.sh -f tsim/insert/basic0.sim ./test.sh -f tsim/insert/basic0.sim
./test.sh -f tsim/insert/basic1.sim ./test.sh -f tsim/insert/basic1.sim
./test.sh -f tsim/insert/backquote.sim
./test.sh -f tsim/insert/null.sim
./test.sh -f tsim/insert/update0.sim
./test.sh -f tsim/insert/commit-merge0.sim ./test.sh -f tsim/insert/commit-merge0.sim
./test.sh -f tsim/insert/insert_drop.sim
./test.sh -f tsim/insert/insert_select.sim ./test.sh -f tsim/insert/insert_select.sim
./test.sh -f tsim/insert/null.sim
./test.sh -f tsim/insert/query_block1_file.sim
./test.sh -f tsim/insert/query_block1_memory.sim
./test.sh -f tsim/insert/query_block2_file.sim
./test.sh -f tsim/insert/query_block2_memory.sim
./test.sh -f tsim/insert/query_file_memory.sim
./test.sh -f tsim/insert/query_multi_file.sim
#./test.sh -f tsim/insert/tcp.sim
./test.sh -f tsim/insert/update0.sim
# ---- parser # ---- parser
./test.sh -f tsim/parser/groupby-basic.sim ./test.sh -f tsim/parser/groupby-basic.sim
......
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/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
sleep 50
sql connect sql connect
print =============== create database print =============== create database
sql create database `database` sql create database `database`
sql create database `DataBase` sql create database `DataBase`
...@@ -184,23 +184,6 @@ print =============== stop and restart taosd ...@@ -184,23 +184,6 @@ print =============== stop and restart taosd
system sh/exec.sh -n dnode1 -s stop -x SIGINT system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
$loop_cnt = 0
check_dnode_ready:
$loop_cnt = $loop_cnt + 1
sleep 200
if $loop_cnt == 10 then
print ====> dnode not ready!
return -1
endi
sql show dnodes
print ===> $rows $data00 $data01 $data02 $data03 $data04 $data05
if $data00 != 1 then
return -1
endi
if $data04 != ready then
goto check_dnode_ready
endi
sql show databases sql show databases
print rows: $rows print rows: $rows
print $data00 $data01 print $data00 $data01
......
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/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect sql connect
$i = 0 $i = 0
......
...@@ -283,30 +283,12 @@ endi ...@@ -283,30 +283,12 @@ endi
# return -1 # return -1
#endi #endi
#===================================================================
#=================================================================== #===================================================================
print =============== stop and restart taosd, then again do query above print =============== stop and restart taosd, then again do query above
system sh/exec.sh -n dnode1 -s stop -x SIGINT system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
$loop_cnt = 0
check_dnode_ready:
$loop_cnt = $loop_cnt + 1
sleep 200
if $loop_cnt == 10 then
print ====> dnode not ready!
return -1
endi
sql show dnodes
print ===> $rows $data00 $data01 $data02 $data03 $data04 $data05
if $data00 != 1 then
return -1
endi
if $data04 != ready then
goto check_dnode_ready
endi
print =============== query data from child table print =============== query data from child table
sql select * from ct1 sql select * from ct1
print rows: $rows print rows: $rows
......
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/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
sleep 50
sql connect sql connect
print =============== create database print =============== create database
sql create database d1 sql create database d1
sql show databases sql show databases
...@@ -78,23 +78,6 @@ print =============== stop and restart taosd ...@@ -78,23 +78,6 @@ print =============== stop and restart taosd
system sh/exec.sh -n dnode1 -s stop -x SIGINT system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
$loop_cnt = 0
check_dnode_ready:
$loop_cnt = $loop_cnt + 1
sleep 200
if $loop_cnt == 10 then
print ====> dnode not ready!
return -1
endi
sql show dnodes
print ===> $rows $data00 $data01 $data02 $data03 $data04 $data05
if $data00 != 1 then
return -1
endi
if $data04 != ready then
goto check_dnode_ready
endi
print =============== query data print =============== query data
sql select * from c1 sql select * from c1
print rows: $rows print rows: $rows
......
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/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
sleep 50
sql connect sql connect
print =============== create database print =============== create database
...@@ -64,23 +63,6 @@ reboot_and_check: ...@@ -64,23 +63,6 @@ reboot_and_check:
system sh/exec.sh -n dnode1 -s stop -x SIGINT system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
$loop_cnt = 0
check_dnode_ready:
$loop_cnt = $loop_cnt + 1
sleep 200
if $loop_cnt == 10 then
print ====> dnode not ready!
return -1
endi
sql show dnodes
print ===> $rows $data00 $data01 $data02 $data03 $data04 $data05
if $data00 != 1 then
return -1
endi
if $data04 != ready then
goto check_dnode_ready
endi
print =============== insert duplicated records to memory - loop $reboot_max - $reboot_cnt print =============== insert duplicated records to memory - loop $reboot_max - $reboot_cnt
sql use db sql use db
sql insert into ct1 values ('2022-05-01 18:30:27.001', 0.0); sql insert into ct1 values ('2022-05-01 18:30:27.001', 0.0);
......
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/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect sql connect
$tbNum = 10 $tbNum = 10
...@@ -19,7 +15,7 @@ $stb = stb ...@@ -19,7 +15,7 @@ $stb = stb
sql drop database $db -x step1 sql drop database $db -x step1
step1: step1:
sql create database $db ctime 30 sql create database $db
print ====== create tables print ====== create tables
sql use $db sql use $db
sql create table $stb (ts timestamp, c1 int) tags(t1 int) sql create table $stb (ts timestamp, c1 int) tags(t1 int)
...@@ -43,13 +39,9 @@ print ====== tables created ...@@ -43,13 +39,9 @@ print ====== tables created
print ================== restart server to commit data into disk print ================== restart server to commit data into disk
system sh/exec.sh -n dnode1 -s stop -x SIGINT system sh/exec.sh -n dnode1 -s stop -x SIGINT
sleep 3000
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
print ================== server restart completed print ================== server restart completed
sql reset query cache
sleep 1000
sql use $db sql use $db
sql drop table tb5 sql drop table tb5
$i = 0 $i = 0
...@@ -69,13 +61,9 @@ endw ...@@ -69,13 +61,9 @@ endw
print ================== restart server to commit data into disk print ================== restart server to commit data into disk
system sh/exec.sh -n dnode1 -s stop -x SIGINT system sh/exec.sh -n dnode1 -s stop -x SIGINT
sleep 3000
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
print ================== server restart completed print ================== server restart completed
sql reset query cache
sleep 1000
sql use $db sql use $db
sql create table tb5 using $stb tags(5) sql create table tb5 using $stb tags(5)
......
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/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
sleep 50
sql connect sql connect
print =============== create database print =============== create database
...@@ -211,66 +210,48 @@ endi ...@@ -211,66 +210,48 @@ endi
#=================================================================== #===================================================================
#print =============== query data from stb #print =============== query data from stb
#sql select * from stb sql select * from stb
#print ===> print ===>
#print ===> rows: $rows print ===> rows: $rows
#print ===> rows0: $data00 $data01 $data02 $data03 $data04 print ===> rows0: $data00 $data01 $data02 $data03 $data04
#if $rows != 4 then if $rows != 12 then
# return -1 return -1
#endi endi
#print =============== select count(*) from supter table #print =============== select count(*) from supter table
#sql select count(*) from stb sql select count(*) from stb
#print $data00 $data01 $data02 print $data00 $data01 $data02
#if $rows != 1 then if $rows != 1 then
# return -1 return -1
#endi endi
#if $data00 != 12 then if $data00 != 12 then
# return -1 return -1
#endi endi
#print =============== select count(column) from supter table #print =============== select count(column) from supter table
#sql select count(ts), count(c1), count(c2), count(c3) from stb sql select count(ts), count(c1), count(c2), count(c3) from stb
#print $data00 $data01 $data02 $data03 print $data00 $data01 $data02 $data03
#if $data00 != 12 then if $data00 != 12 then
# return -1 return -1
#endi endi
#if $data01 != 8 then if $data01 != 8 then
# return -1 return -1
#endi endi
#if $data02 != 8 then if $data02 != 8 then
# return -1 return -1
#endi endi
#if $data03 != 8 then if $data03 != 8 then
# return -1 return -1
#endi endi
#===================================================================
#=================================================================== #===================================================================
print =============== stop and restart taosd, then again do query above print =============== stop and restart taosd, then again do query above
system sh/exec.sh -n dnode1 -s stop -x SIGINT system sh/exec.sh -n dnode1 -s stop -x SIGINT
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
print ===> waiting dnode ready
$loop_cnt = 0
check_dnode_ready:
$loop_cnt = $loop_cnt + 1
sleep 200
if $loop_cnt == 10 then
print ====> dnode not ready!
return -1
endi
sql show dnodes
print ===> $rows $data00 $data01 $data02 $data03 $data04 $data05
if $data00 != 1 then
return -1
endi
if $data04 != ready then
goto check_dnode_ready
endi
#===================================================================
#=================================================================== #===================================================================
print =============== query data from child table print =============== query data from child table
sql select * from ct1 sql select * from ct1
print ===> select * from ct1 print ===> select * from ct1
...@@ -292,15 +273,15 @@ endi ...@@ -292,15 +273,15 @@ endi
if $data03 != 3.000000000 then if $data03 != 3.000000000 then
return -1 return -1
endi endi
#if $data41 != -14 then if $data41 != 12 then
# return -1 return -1
#endi endi
#if $data42 != -2.40000 then if $data42 != 2.20000 then
# return -1 return -1
#endi endi
#if $data43 != -3.400000000 then if $data43 != NULL then
# return -1 return -1
#endi endi
print =============== select count(*) from child table print =============== select count(*) from child table
sql select count(*) from ct1 sql select count(*) from ct1
...@@ -435,40 +416,39 @@ if $data92 != 3.600000000 then ...@@ -435,40 +416,39 @@ if $data92 != 3.600000000 then
return -1 return -1
endi endi
#=================================================================== #===================================================================
#===================================================================
#print =============== query data from stb print =============== query data from stb
#sql select * from stb sql select * from stb
#print ===> print ===>
#print ===> rows: $rows print ===> rows: $rows
#print ===> rows0: $data00 $data01 $data02 $data03 $data04 print ===> rows0: $data00 $data01 $data02 $data03 $data04
#if $rows != 4 then if $rows != 12 then
# return -1 return -1
#endi endi
#print =============== select count(*) from supter table print =============== select count(*) from supter table
#sql select count(*) from stb sql select count(*) from stb
#print $data00 $data01 $data02 print $data00 $data01 $data02
#if $rows != 1 then if $rows != 1 then
# return -1 return -1
#endi endi
#if $data00 != 12 then if $data00 != 12 then
# return -1 return -1
#endi endi
#print =============== select count(column) from supter table print =============== select count(column) from supter table
#sql select count(ts), count(c1), count(c2), count(c3) from stb sql select count(ts), count(c1), count(c2), count(c3) from stb
#print $data00 $data01 $data02 $data03 print $data00 $data01 $data02 $data03
#if $data00 != 12 then if $data00 != 12 then
# return -1 return -1
#endi endi
#if $data01 != 8 then if $data01 != 8 then
# return -1 return -1
#endi endi
#if $data02 != 8 then if $data02 != 8 then
# return -1 return -1
#endi endi
#if $data03 != 8 then if $data03 != 8 then
# return -1 return -1
#endi endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT system sh/exec.sh -n dnode1 -s stop -x SIGINT
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/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect sql connect
$i = 0 $i = 0
...@@ -190,7 +185,7 @@ clear: ...@@ -190,7 +185,7 @@ clear:
sql drop database $db sql drop database $db
sql show databases sql show databases
if $rows != 0 then if $rows != 2 then
return -1 return -1
endi endi
......
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/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect sql connect
$i = 0 $i = 0
...@@ -175,7 +170,7 @@ clear: ...@@ -175,7 +170,7 @@ clear:
sql drop database $db sql drop database $db
sql show databases sql show databases
if $rows != 0 then if $rows != 2 then
return -1 return -1
endi endi
......
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/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect sql connect
$i = 0 $i = 0
...@@ -19,15 +14,7 @@ sql drop database -x step1 ...@@ -19,15 +14,7 @@ sql drop database -x step1
step1: step1:
sql create database $db sql create database $db
sql use $db sql use $db
sql create table $tb (ts timestamp, speed int)
$x = 0
create1:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
endi
sql create table $tb (ts timestamp, speed int) -x create1
#commit to file will trigger if insert 82 rows #commit to file will trigger if insert 82 rows
$N = 82 $N = 82
...@@ -204,7 +191,7 @@ clear: ...@@ -204,7 +191,7 @@ clear:
sql drop database $db sql drop database $db
sql show databases sql show databases
if $rows != 0 then if $rows != 2 then
return -1 return -1
endi endi
......
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/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect sql connect
$i = 0 $i = 0
...@@ -167,7 +162,7 @@ endi ...@@ -167,7 +162,7 @@ endi
sql drop database $db sql drop database $db
sql show databases sql show databases
if $rows != 0 then if $rows != 2 then
return -1 return -1
endi endi
......
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/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect sql connect
$i = 0 $i = 0
...@@ -20,14 +15,7 @@ step1: ...@@ -20,14 +15,7 @@ step1:
sql create database $db sql create database $db
sql use $db sql use $db
$x = 0 sql create table $tb (ts timestamp, speed int)
create1:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
endi
sql create table $tb (ts timestamp, speed int) -x create1
#commit to file will trigger if insert 82 rows #commit to file will trigger if insert 82 rows
...@@ -202,7 +190,7 @@ clear: ...@@ -202,7 +190,7 @@ clear:
sql drop database $db sql drop database $db
sql show databases sql show databases
if $rows != 0 then if $rows != 2 then
return -1 return -1
endi endi
......
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/cfg.sh -n dnode1 -c walLevel -v 1
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect sql connect
$i = 0 $i = 0
...@@ -20,14 +15,7 @@ step1: ...@@ -20,14 +15,7 @@ step1:
sql create database $db sql create database $db
sql use $db sql use $db
$x = 0 sql create table $tb (ts timestamp, speed int)
create1:
$x = $x + 1
sleep 1000
if $x == 20 then
return -1
endi
sql create table $tb (ts timestamp, speed int) -x create1
$N = 20000 $N = 20000
...@@ -49,7 +37,7 @@ endi ...@@ -49,7 +37,7 @@ endi
sql drop database $db sql drop database $db
sql show databases sql show databases
if $rows != 0 then if $rows != 2 then
return -1 return -1
endi endi
......
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/cfg.sh -n dnode1 -c walLevel -v 1 system sh/cfg.sh -n dnode1 -c debugflag -v 131
system sh/exec.sh -n dnode1 -s start system sh/exec.sh -n dnode1 -s start
sleep 2000
sql connect sql connect
sql create database d1; sql create database d1;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册