From 06656d0daa8d0cacc9d656be1fa6535aa7dc3ebd Mon Sep 17 00:00:00 2001 From: plum-lihui Date: Tue, 26 Apr 2022 18:57:53 +0800 Subject: [PATCH] [test: add to check vnode statu for replica 3] --- tests/script/tsim/db/alter_option.sim | 43 +++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/tests/script/tsim/db/alter_option.sim b/tests/script/tsim/db/alter_option.sim index 57324367b5..3b61b907de 100644 --- a/tests/script/tsim/db/alter_option.sim +++ b/tests/script/tsim/db/alter_option.sim @@ -126,6 +126,49 @@ if $data16_db != ns then # precision return -1 endi +sleep 3000 +sql show db.vgroups +if $data[0][4] == LEADER then + if $data[0][6] != FOLLOWER then + return -1 + endi + if $data[0][8] != FOLLOWER then + return -1 + endi +endi +if $data[0][6] == LEADER then + if $data[0][4] != FOLLOWER then + return -1 + endi + if $data[0][8] != FOLLOWER then + return -1 + endi +endi +if $data[0][8] == LEADER then + if $data[0][4] != FOLLOWER then + return -1 + endi + if $data[0][6] != FOLLOWER then + return -1 + endi +endi + +if $data[0][4] != LEADER then + if $data[0][4] != FOLLOWER then + return -1 + endi +endi +if $data[0][6] != LEADER then + if $data[0][6] != FOLLOWER then + return -1 + endi +endi +if $data[0][8] != LEADER then + if $data[0][8] != FOLLOWER then + return -1 + endi +endi + print ============== not support modify options: name, create_time, vgroups, ntables sql_error alter database db name dba sql_error alter database db create_time "2022-03-03 15:08:13.329"