diff --git a/tests/script/jenkins/basic.txt b/tests/script/jenkins/basic.txt index d3a6a0d102..df174aa950 100644 --- a/tests/script/jenkins/basic.txt +++ b/tests/script/jenkins/basic.txt @@ -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 diff --git a/tests/script/tsim/db/alter_replica_31.sim b/tests/script/tsim/db/alter_replica_31.sim index cbd4183b5e..e9a295820c 100644 --- a/tests/script/tsim/db/alter_replica_31.sim +++ b/tests/script/tsim/db/alter_replica_31.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)[7] != NULL then +if $data(2)[8] == leader then + $hasleader = 1 +endi +if $hasleader != 1 then goto step3 endi print ============= step5: stop dnode 2 -return sql select * from db.stb if $rows != 1 then return -1 diff --git a/tests/script/tsim/dnode/balance_replica3.sim b/tests/script/tsim/dnode/balance_replica3.sim index b8996e259d..276621cfcc 100644 --- a/tests/script/tsim/dnode/balance_replica3.sim +++ b/tests/script/tsim/dnode/balance_replica3.sim @@ -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