checkError7.sim 1.4 KB
Newer Older
S
Shengliang Guan 已提交
1 2 3 4 5 6 7 8 9 10
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1
system sh/exec.sh -n dnode1 -s start -v
sql connect

print ======================== create stable
sql create database d1
sql use d1

$x = 0
11
while $x < 5
S
Shengliang Guan 已提交
12
  $tb = d1.s . $x
13
  print create table $tb (ts timestamp, i int) tags (j int)
S
Shengliang Guan 已提交
14 15 16 17 18 19 20
  sql create table $tb (ts timestamp, i int) tags (j int)
  $x = $x + 1
endw

print ======================== describe stables
# TODO : create stable error
$m = 0
21
while $m < 5
S
Shengliang Guan 已提交
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
  $tb = s . $m
  $filter = ' . $tb
  $filter = $filter . '
  sql show stables like $filter
  print sql : show stables like $filter
  if $rows != 1 then
    print expect 1, actual: $rows
    return -1
  endi
  $m = $m + 1
endw


print ======================== show stables

sql show d1.stables

print num of stables is $rows
40
if $rows != 5 then
S
Shengliang Guan 已提交
41 42 43 44 45 46
  return -1
endi

print ======================== create table

$x = 0
47
while $x < 42
S
Shengliang Guan 已提交
48
  $tb = d1.t . $x
49
  print create table $tb using d1.s0 tags( $x )
S
Shengliang Guan 已提交
50 51 52 53 54 55 56 57 58
  sql create table $tb using d1.s0 tags( $x )
  $x = $x + 1
endw

print ======================== show stables

sql show d1.tables

print num of tables is $rows
59
if $rows != 42 then
S
Shengliang Guan 已提交
60 61 62 63 64 65 66 67 68 69 70
  return -1
endi


_OVER:
system sh/exec.sh -n dnode1 -s stop -x SIGINT
print =============== check
$null=

system_content sh/checkValgrind.sh -n dnode1 
print cmd return result ----> [ $system_content ]
S
Shengliang Guan 已提交
71
if $system_content > 0 then
S
Shengliang Guan 已提交
72 73 74 75 76 77
  return -1
endi 

if $system_content == $null then
  return -1
endi