system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1

system rm -rf ../../sim/dnode1/log

system sh/exec.sh -n dnode1 -s start
sql connect

print =============== create database
sql create database d1 vgroups 2
sql select * from information_schema.ins_databases
if $rows != 3 then
  return -1
endi

print =============== restart

system sh/exec.sh -n dnode1 -s stop -x SIGKILL
sleep 200
system rm -rf ../../sim/dnode1/log
system sh/exec.sh -n dnode1 -s start

print =============== select * from information_schema.ins_databases
sql create database d2 vgroups 6
sql select * from information_schema.ins_databases
if $rows != 4 then
  return -1
endi

system sh/exec.sh -n dnode1 -s stop -x SIGINT
