未验证 提交 1fdc8d5d 编写于 作者: S Shengliang Guan 提交者: GitHub

Merge pull request #14305 from taosdata/fix/mnode

test: case for alter db
......@@ -11,7 +11,7 @@
./test.sh -f tsim/db/create_all_options.sim
./test.sh -f tsim/db/alter_option.sim
./test.sh -f tsim/db/alter_replica_13.sim
#./test.sh -f tsim/db/alter_replica_31.sim
./test.sh -f tsim/db/alter_replica_31.sim
./test.sh -f tsim/db/basic1.sim
./test.sh -f tsim/db/basic2.sim
./test.sh -f tsim/db/basic3.sim
......@@ -22,7 +22,7 @@
# ---- dnode
./test.sh -f tsim/dnode/balance_replica1.sim
#./test.sh -f tsim/dnode/balance_replica3.sim
./test.sh -f tsim/dnode/balance_replica3.sim
./test.sh -f tsim/dnode/create_dnode.sim
./test.sh -f tsim/dnode/drop_dnode_has_mnode.sim
./test.sh -f tsim/dnode/drop_dnode_has_qnode_snode.sim
......
......@@ -89,13 +89,13 @@ step2:
endi
sql show db.vgroups
print ===> $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07 $data08
if $data(2)[3] != 4 then
if $data(2)[3] != 2 then
return -1
endi
if $data(2)[5] != 3 then
return -1
endi
if $data(2)[7] != 2 then
if $data(2)[7] != 4 then
return -1
endi
if $data(2)[4] == leader then
......@@ -118,7 +118,7 @@ sql insert into db.ctb values(now, 1, "2")
sql show db.vgroups
print ===> $data00 $data01 $data02 $data03 $data04 $data05 $data06 $data07 $data08
sleep 1000
sleep 100
sql select * from db.ctb
print ===> $data00 $data01 $data02 $data03 $data04 $data05
......@@ -126,10 +126,9 @@ if $rows != 1 then
return -1
endi
sleep 3000
print ============= step3: alter database
sql alter database db replica 1
$hasleader = 0
$x = 0
step3:
......@@ -144,18 +143,20 @@ print ===> rows: $rows
if $rows != 1 then
goto step3
endi
if $data(2)[3] != 4 then
goto step3
if $data(2)[4] == leader then
$hasleader = 1
endi
if $data(2)[5] != NULL then
goto step3
if $data(2)[6] == leader then
$hasleader = 1
endi
if $data(2)[8] == leader then
$hasleader = 1
endi
if $data(2)[7] != NULL then
if $hasleader != 1 then
goto step3
endi
print ============= step5: stop dnode 2
return
sql select * from db.stb
if $rows != 1 then
return -1
......
......@@ -347,10 +347,7 @@ if $leaderExist != 1 then
goto step65
endi
print =============== step7: select data
sql show d1.tables
print rows $rows
if $rows != 6 then
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册