test: add case
This commit is contained in:
parent
21748defea
commit
efdcfe4653
|
@ -45,74 +45,9 @@ if $data(4)[4] != ready then
|
||||||
goto step1
|
goto step1
|
||||||
endi
|
endi
|
||||||
|
|
||||||
return
|
return
|
||||||
|
|
||||||
print =============== step2: create database
|
print =============== step2: create database
|
||||||
sql create database db vgroups 1 replica 3
|
sql create database db vgroups 33 replica 3
|
||||||
sql select * from information_schema.ins_databases
|
|
||||||
if $rows != 3 then
|
|
||||||
return -1
|
|
||||||
endi
|
|
||||||
if $data(db)[4] != 3 then
|
|
||||||
return -1
|
|
||||||
endi
|
|
||||||
|
|
||||||
sql select * from information_schema.ins_dnodes
|
|
||||||
if $data(2)[2] != 1 then
|
|
||||||
return -1
|
|
||||||
endi
|
|
||||||
if $data(3)[2] != 1 then
|
|
||||||
return -1
|
|
||||||
endi
|
|
||||||
if $data(4)[2] != 1 then
|
|
||||||
return -1
|
|
||||||
endi
|
|
||||||
|
|
||||||
# vnodes
|
|
||||||
sql select * from information_schema.ins_dnodes
|
|
||||||
if $data(2)[2] != 1 then
|
|
||||||
return -1
|
|
||||||
endi
|
|
||||||
if $data(3)[2] != 1 then
|
|
||||||
return -1
|
|
||||||
endi
|
|
||||||
if $data(4)[2] != 1 then
|
|
||||||
return -1
|
|
||||||
endi
|
|
||||||
|
|
||||||
# v1_dnode
|
|
||||||
$hasleader = 0
|
|
||||||
$x = 0
|
|
||||||
step2:
|
|
||||||
$x = $x + 1
|
|
||||||
sleep 1000
|
|
||||||
if $x == 20 then
|
|
||||||
print ====> dnode not ready!
|
|
||||||
return -1
|
|
||||||
endi
|
|
||||||
sql show db.vgroups
|
|
||||||
print ===> $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07 $data08
|
|
||||||
if $data(2)[3] != 2 then
|
|
||||||
return -1
|
|
||||||
endi
|
|
||||||
if $data(2)[5] != 3 then
|
|
||||||
return -1
|
|
||||||
endi
|
|
||||||
if $data(2)[7] != 4 then
|
|
||||||
return -1
|
|
||||||
endi
|
|
||||||
if $data(2)[4] == leader then
|
|
||||||
$hasleader = 1
|
|
||||||
endi
|
|
||||||
if $data(2)[6] == leader then
|
|
||||||
$hasleader = 1
|
|
||||||
endi
|
|
||||||
if $data(2)[8] == leader then
|
|
||||||
$hasleader = 1
|
|
||||||
endi
|
|
||||||
if $hasleader != 1 then
|
|
||||||
goto step2
|
|
||||||
endi
|
|
||||||
|
|
||||||
sql use db;
|
sql use db;
|
||||||
sql create table stb (ts timestamp, c int) tags (t int);
|
sql create table stb (ts timestamp, c int) tags (t int);
|
||||||
|
@ -122,6 +57,8 @@ sql select * from information_schema.ins_stables where db_name = 'db';
|
||||||
sql select * from information_schema.ins_tables where db_name = 'db';
|
sql select * from information_schema.ins_tables where db_name = 'db';
|
||||||
sql show db.vgroups;
|
sql show db.vgroups;
|
||||||
|
|
||||||
|
system sh/exec.sh -n dnode2 -s stop
|
||||||
|
|
||||||
return
|
return
|
||||||
print ======== start back
|
print ======== start back
|
||||||
run_back tmp/back.sim
|
run_back tmp/back.sim
|
||||||
|
|
Loading…
Reference in New Issue