提交 0f008389 编写于 作者: S Shengliang Guan

test: adjust case

上级 0e3533bf
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 debugflag -v 131 system sh/exec.sh -n dnode1 -s start
system sh/exec.sh -n dnode1 -s start -v
sql connect sql connect
print =============== step1: create drop show dnodes print =============== create database d1
$x = 0 sql create database d1
step1: sql create table d1.t1 (ts timestamp, i int);
$x = $x + 1 sql create table d1.t2 (ts timestamp, i int);
sleep 1000 sql create table d1.t3 (ts timestamp, i int);
if $x == 10 then sql create table d1.t4 (ts timestamp, i int);
print ---> dnode not ready!
return -1 sql show databases
endi if $rows != 3 then
sql show dnodes
print ---> $data00 $data01 $data02 $data03 $data04 $data05
if $rows != 1 then
return -1 return -1
endi endi
if $data(1)[4] != ready then
goto step1
endi
$tbPrefix = tb
$tbNum = 5
$rowNum = 10
print =============== step2: prepare data if $data20 != d1 then
sql create database db vgroups 2 return -1
sql use db endi
sql create table if not exists stb (ts timestamp, tbcol int, tbcol2 float, tbcol3 double, tbcol4 binary(30), tbcol5 binary(30)) tags (tgcol int unsigned)
$i = 0 if $data22 != 2 then
while $i < $tbNum return -1
$tb = $tbPrefix . $i endi
sql create table $tb using stb tags( $i )
$x = 0
while $x < $rowNum
$cc = $x * 60000
$ms = 1601481600000 + $cc
sql insert into $tb values ($ms , $x , $x , $x , "abcd1234=-+*" , "123456 0" )
$x = $x + 1
endw
$cc = $x * 60000 #if $data03 != 4 then
$ms = 1601481600000 + $cc # return -1
sql insert into $tb values ($ms , NULL , NULL , NULL , NULL , NULL ) #endi
$i = $i + 1
endw
print =============== step3: tb sql show d1.tables
sql select tbcol5 - tbcol tbcol from tb1 if $rows != 4 then
sql select tbcol2 - tbcol tbcol from tb1 return -1
endi
_OVER: print =============== create database d2
system sh/exec.sh -n dnode1 -s stop -x SIGINT sql create database d2
print =============== check sql create table d2.t1 (ts timestamp, i int);
$null= sql create table d2.t2 (ts timestamp, i int);
sql create table d2.t3 (ts timestamp, i int);
system_content sh/checkValgrind.sh -n dnode1 sql show databases
print cmd return result ----> [ $system_content ] if $rows != 4 then
if $system_content > 0 then
return -1 return -1
endi endi
if $system_content == $null then sql show d2.tables
if $rows != 3 then
return -1 return -1
endi endi
system sh/exec.sh -n dnode1 -s stop -x SIGINT
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册