system sh/stop_dnodes.sh



system sh/deploy.sh -n dnode1 -i 1
system sh/deploy.sh -n dnode2 -i 2
system sh/deploy.sh -n dnode3 -i 3

system sh/cfg.sh -n dnode1 -c wallevel -v 2
system sh/cfg.sh -n dnode2 -c wallevel -v 2
system sh/cfg.sh -n dnode3 -c wallevel -v 2
system sh/cfg.sh -n dnode1 -c numOfMPeers -v 3
system sh/cfg.sh -n dnode2 -c numOfMPeers -v 3
system sh/cfg.sh -n dnode3 -c numOfMPeers -v 3
system sh/cfg.sh -n dnode1 -c numOfTotalVnodes -v 10
system sh/cfg.sh -n dnode2 -c numOfTotalVnodes -v 10
system sh/cfg.sh -n dnode3 -c numOfTotalVnodes -v 10

print ========= start dnodes
system sh/exec_up.sh -n dnode1 -s start
sql connect
sql create dnode $hostname2
system sh/exec_up.sh -n dnode2 -s start
sql create dnode $hostname3
system sh/exec_up.sh -n dnode3 -s start
sleep 3000

print ======== step1 
sql create database db replica 3 ablocks 2 tblocks 5 maxtables 10000
sql create table db.mt (ts timestamp, tbcol int) TAGS(tgcol int)

$tbPrefix = db.t
$i = 0
while $i < 100000
  $tb = $tbPrefix . $i
  sql create table $tb using db.mt tags( $i )
  $i = $i + 1
endw 

print ======== step2
sleep 1000
sql drop database db
sql show databases
if $rows != 0 then 
  return -1
endi 

system sh/exec_up.sh -n dnode1 -s stop  -x SIGINT
system sh/exec_up.sh -n dnode2 -s stop  -x SIGINT
system sh/exec_up.sh -n dnode3 -s stop  -x SIGINT
system sh/exec_up.sh -n dnode4 -s stop  -x SIGINT
system sh/exec_up.sh -n dnode5 -s stop  -x SIGINT
system sh/exec_up.sh -n dnode6 -s stop  -x SIGINT
system sh/exec_up.sh -n dnode7 -s stop  -x SIGINT
system sh/exec_up.sh -n dnode8 -s stop  -x SIGINT