kill.sim 1.5 KB
Newer Older
S
TD-1949  
Shengliang Guan 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77
system sh/stop_dnodes.sh
system sh/deploy.sh -n dnode1 -i 1

print ============== deploy
system sh/exec.sh -n dnode1 -s start 
sleep 3001
sql connect

sql create database d1
sql use d1

sql create table t1 (ts timestamp, i int) 
sql insert into t1 values(now, 1);

print ===============  step3
sleep 3000
sql select * from t1;
print rows: $rows
if $rows != 1 then
  return -1
endi
system sh/exec.sh -n dnode1 -s stop -x SIGKILL
sleep 3000

print ===============  step4
system sh/exec.sh -n dnode1 -s start -x SIGKILL
sleep 3000
sql select * from t1;
print rows: $rows
if $rows != 1 then
  return -1
endi
system sh/exec.sh -n dnode1 -s stop -x SIGKILL
sleep 3000

print ===============  step5
system sh/exec.sh -n dnode1 -s start -x SIGKILL
sleep 3000
sql select * from t1;
print rows: $rows
if $rows != 1 then
  return -1
endi
system sh/exec.sh -n dnode1 -s stop -x SIGKILL
sleep 3000

print ===============  step6
system sh/exec.sh -n dnode1 -s start -x SIGKILL
sleep 3000
sql select * from t1;
print rows: $rows
if $rows != 1 then
  return -1
endi
system sh/exec.sh -n dnode1 -s stop -x SIGKILL
sleep 3000

print ===============  step7
system sh/exec.sh -n dnode1 -s start -x SIGKILL
sleep 3000
sql select * from t1;
print rows: $rows
if $rows != 1 then
  return -1
endi
system sh/exec.sh -n dnode1 -s stop -x SIGKILL
sleep 3000

print ===============  step8
system sh/exec.sh -n dnode1 -s start -x SIGKILL
sleep 3000
sql select * from t1;
print rows: $rows
if $rows != 1 then
  return -1
endi
system sh/exec.sh -n dnode1 -s stop -x SIGKILL