From 4968b11a5b4f8e80b0847968f26358bd70ff3844 Mon Sep 17 00:00:00 2001 From: Shengliang Guan Date: Wed, 19 Oct 2022 21:01:24 +0800 Subject: [PATCH] test: adjust case --- .../6-cluster/vnode/4dnode1mnode_basic_createDb_replica1.py | 6 +++--- .../vnode/4dnode1mnode_basic_replica1_insertdatas.py | 4 ++-- .../vnode/4dnode1mnode_basic_replica1_insertdatas_querys.py | 4 ++-- .../vnode/4dnode1mnode_basic_replica3_insertdatas.py | 4 ++-- .../vnode/4dnode1mnode_basic_replica3_insertdatas_querys.py | 4 ++-- ...ic_replica3_insertdatas_querys_loop_restart_all_vnode.py | 4 ++-- ...sic_replica3_insertdatas_querys_loop_restart_follower.py | 4 ++-- ...basic_replica3_insertdatas_querys_loop_restart_leader.py | 4 ++-- ...e1mnode_basic_replica3_insertdatas_stop_follower_sync.py | 4 ++-- ...mnode_basic_replica3_insertdatas_stop_follower_unsync.py | 4 ++-- ..._replica3_insertdatas_stop_follower_unsync_force_stop.py | 4 ++-- ...de_basic_replica3_insertdatas_stop_leader_forece_stop.py | 4 ++-- ...4dnode1mnode_basic_replica3_mnode3_insertdatas_querys.py | 4 ++-- .../6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups.py | 4 ++-- .../vnode/4dnode1mnode_basic_replica3_vgroups_stopOne.py | 4 ++-- 15 files changed, 31 insertions(+), 31 deletions(-) diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_createDb_replica1.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_createDb_replica1.py index 050c10d093..8d07dc6b38 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_createDb_replica1.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_createDb_replica1.py @@ -61,7 +61,7 @@ class TDTestCase: # only for 1 mnode mnode_name = k - if v[2] =='leader': + if v[2] in ['leader', 'leader*']: is_leader=True if count==1 and is_leader: @@ -109,12 +109,12 @@ class TDTestCase: vgroup_id = vgroup_info[0] tmp_list = [] for role in vgroup_info[3:-4]: - if role in ['leader','follower']: + if role in ['leader', 'leader*', 'follower']: tmp_list.append(role) vgroups_infos[vgroup_id]=tmp_list for k , v in vgroups_infos.items(): - if len(v) ==1 and v[0]=="leader": + if len(v) ==1 and v[0] in ['leader', 'leader*']: tdLog.notice(" === create database replica only 1 role leader check success of vgroup_id {} ======".format(k)) else: tdLog.exit(" === create database replica only 1 role leader check fail of vgroup_id {} ======".format(k)) diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas.py index 1e1f45d65e..470278cd8e 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas.py @@ -115,12 +115,12 @@ class TDTestCase: vgroup_id = vgroup_info[0] tmp_list = [] for role in vgroup_info[3:-4]: - if role in ['leader','follower']: + if role in ['leader','leader*','follower']: tmp_list.append(role) vgroups_infos[vgroup_id]=tmp_list for k , v in vgroups_infos.items(): - if len(v) ==1 and v[0]=="leader": + if len(v) ==1 and v[0] in ['leader', 'leader*']: tdLog.notice(" === create database replica only 1 role leader check success of vgroup_id {} ======".format(k)) else: tdLog.exit(" === create database replica only 1 role leader check fail of vgroup_id {} ======".format(k)) diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas_querys.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas_querys.py index ca12dd6c9d..a5ce8171c7 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas_querys.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica1_insertdatas_querys.py @@ -116,12 +116,12 @@ class TDTestCase: vgroup_id = vgroup_info[0] tmp_list = [] for role in vgroup_info[3:-4]: - if role in ['leader','follower']: + if role in ['leader','leader*','follower']: tmp_list.append(role) vgroups_infos[vgroup_id]=tmp_list for k , v in vgroups_infos.items(): - if len(v) ==1 and v[0]=="leader": + if len(v) ==1 and v[0] in ['leader', 'leader*']: tdLog.notice(" === create database replica only 1 role leader check success of vgroup_id {} ======".format(k)) else: tdLog.exit(" === create database replica only 1 role leader check fail of vgroup_id {} ======".format(k)) diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas.py index 2d3e5e3178..60e3167304 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas.py @@ -115,12 +115,12 @@ class TDTestCase: vgroup_id = vgroup_info[0] tmp_list = [] for role in vgroup_info[3:-4]: - if role in ['leader','follower']: + if role in ['leader','leader*','follower']: tmp_list.append(role) vgroups_infos[vgroup_id]=tmp_list for k , v in vgroups_infos.items(): - if len(v) ==1 and v[0]=="leader": + if len(v) ==1 and v[0] in ['leader', 'leader*']: tdLog.notice(" === create database replica only 1 role leader check success of vgroup_id {} ======".format(k)) else: tdLog.exit(" === create database replica only 1 role leader check fail of vgroup_id {} ======".format(k)) diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys.py index c8fa8ee435..9d96ab1e9e 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys.py @@ -116,12 +116,12 @@ class TDTestCase: vgroup_id = vgroup_info[0] tmp_list = [] for role in vgroup_info[3:-4]: - if role in ['leader','follower']: + if role in ['leader','leader*','follower']: tmp_list.append(role) vgroups_infos[vgroup_id]=tmp_list for k , v in vgroups_infos.items(): - if len(v) ==1 and v[0]=="leader": + if len(v) ==1 and v[0] in ['leader', 'leader*']: tdLog.notice(" === create database replica only 1 role leader check success of vgroup_id {} ======".format(k)) else: tdLog.exit(" === create database replica only 1 role leader check fail of vgroup_id {} ======".format(k)) diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_all_vnode.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_all_vnode.py index 447da77db3..8e7ac388fb 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_all_vnode.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_all_vnode.py @@ -119,12 +119,12 @@ class TDTestCase: vgroup_id = vgroup_info[0] tmp_list = [] for role in vgroup_info[3:-4]: - if role in ['leader','follower']: + if role in ['leader','leader*','follower']: tmp_list.append(role) vgroups_infos[vgroup_id]=tmp_list for k , v in vgroups_infos.items(): - if len(v) ==1 and v[0]=="leader": + if len(v) ==1 and v[0] in ['leader', 'leader*']: tdLog.notice(" === create database replica only 1 role leader check success of vgroup_id {} ======".format(k)) else: tdLog.exit(" === create database replica only 1 role leader check fail of vgroup_id {} ======".format(k)) diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_follower.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_follower.py index 6175f4e7cc..39bd0133cf 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_follower.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_follower.py @@ -118,12 +118,12 @@ class TDTestCase: vgroup_id = vgroup_info[0] tmp_list = [] for role in vgroup_info[3:-4]: - if role in ['leader','follower']: + if role in ['leader','leader*','follower']: tmp_list.append(role) vgroups_infos[vgroup_id]=tmp_list for k , v in vgroups_infos.items(): - if len(v) ==1 and v[0]=="leader": + if len(v) ==1 and v[0] in ['leader', 'leader*']: tdLog.notice(" === create database replica only 1 role leader check success of vgroup_id {} ======".format(k)) else: tdLog.exit(" === create database replica only 1 role leader check fail of vgroup_id {} ======".format(k)) diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_leader.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_leader.py index 27405774cc..6d4a9172f7 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_leader.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_querys_loop_restart_leader.py @@ -118,12 +118,12 @@ class TDTestCase: vgroup_id = vgroup_info[0] tmp_list = [] for role in vgroup_info[3:-4]: - if role in ['leader','follower']: + if role in ['leader','leader*','follower']: tmp_list.append(role) vgroups_infos[vgroup_id]=tmp_list for k , v in vgroups_infos.items(): - if len(v) ==1 and v[0]=="leader": + if len(v) ==1 and v[0] in ['leader', 'leader*']: tdLog.notice(" === create database replica only 1 role leader check success of vgroup_id {} ======".format(k)) else: tdLog.exit(" === create database replica only 1 role leader check fail of vgroup_id {} ======".format(k)) diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_sync.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_sync.py index 1dc364c2fd..90358069aa 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_sync.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_sync.py @@ -124,12 +124,12 @@ class TDTestCase: vgroup_id = vgroup_info[0] tmp_list = [] for role in vgroup_info[3:-4]: - if role in ['leader','follower']: + if role in ['leader','leader*','follower']: tmp_list.append(role) vgroups_infos[vgroup_id]=tmp_list for k , v in vgroups_infos.items(): - if len(v) ==1 and v[0]=="leader": + if len(v) ==1 and v[0] in ['leader', 'leader*']: tdLog.notice(" === create database replica only 1 role leader check success of vgroup_id {} ======".format(k)) else: tdLog.exit(" === create database replica only 1 role leader check fail of vgroup_id {} ======".format(k)) diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync.py index 3873040d20..55a2318817 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync.py @@ -124,12 +124,12 @@ class TDTestCase: vgroup_id = vgroup_info[0] tmp_list = [] for role in vgroup_info[3:-4]: - if role in ['leader','follower']: + if role in ['leader','leader*','follower']: tmp_list.append(role) vgroups_infos[vgroup_id]=tmp_list for k , v in vgroups_infos.items(): - if len(v) ==1 and v[0]=="leader": + if len(v) ==1 and v[0] in ['leader', 'leader*']: tdLog.notice(" === create database replica only 1 role leader check success of vgroup_id {} ======".format(k)) else: tdLog.exit(" === create database replica only 1 role leader check fail of vgroup_id {} ======".format(k)) diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync_force_stop.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync_force_stop.py index 188b0030f2..f5e4ea0663 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync_force_stop.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_follower_unsync_force_stop.py @@ -124,12 +124,12 @@ class TDTestCase: vgroup_id = vgroup_info[0] tmp_list = [] for role in vgroup_info[3:-4]: - if role in ['leader','follower']: + if role in ['leader','leader*','follower']: tmp_list.append(role) vgroups_infos[vgroup_id]=tmp_list for k , v in vgroups_infos.items(): - if len(v) ==1 and v[0]=="leader": + if len(v) ==1 and v[0] in ['leader', 'leader*']: tdLog.notice(" === create database replica only 1 role leader check success of vgroup_id {} ======".format(k)) else: tdLog.exit(" === create database replica only 1 role leader check fail of vgroup_id {} ======".format(k)) diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader_forece_stop.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader_forece_stop.py index 5ba6c6ab8d..4ec558655f 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader_forece_stop.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_insertdatas_stop_leader_forece_stop.py @@ -207,12 +207,12 @@ class TDTestCase: vgroup_id = vgroup_info[0] tmp_list = [] for role in vgroup_info[3:-4]: - if role in ['leader','follower']: + if role in ['leader','leader*','follower']: tmp_list.append(role) vgroups_infos[vgroup_id]=tmp_list for k , v in vgroups_infos.items(): - if len(v) ==1 and v[0]=="leader": + if len(v) ==1 and v[0] in ['leader', 'leader*']: tdLog.notice(" === create database replica only 1 role leader check success of vgroup_id {} ======".format(k)) else: tdLog.exit(" === create database replica only 1 role leader check fail of vgroup_id {} ======".format(k)) diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_mnode3_insertdatas_querys.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_mnode3_insertdatas_querys.py index 0a4162bd99..0a1c4e1183 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_mnode3_insertdatas_querys.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_mnode3_insertdatas_querys.py @@ -116,12 +116,12 @@ class TDTestCase: vgroup_id = vgroup_info[0] tmp_list = [] for role in vgroup_info[3:-4]: - if role in ['leader','follower']: + if role in ['leader','leader*','follower']: tmp_list.append(role) vgroups_infos[vgroup_id]=tmp_list for k , v in vgroups_infos.items(): - if len(v) ==1 and v[0]=="leader": + if len(v) ==1 and v[0] in ['leader', 'leader*']: tdLog.notice(" === create database replica only 1 role leader check success of vgroup_id {} ======".format(k)) else: tdLog.exit(" === create database replica only 1 role leader check fail of vgroup_id {} ======".format(k)) diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups.py index 8a6412dfcc..bd7c05b03c 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups.py @@ -115,12 +115,12 @@ class TDTestCase: vgroup_id = vgroup_info[0] tmp_list = [] for role in vgroup_info[3:-4]: - if role in ['leader','follower']: + if role in ['leader','leader*','follower']: tmp_list.append(role) vgroups_infos[vgroup_id]=tmp_list for k , v in vgroups_infos.items(): - if len(v) ==1 and v[0]=="leader": + if len(v) ==1 and v[0] in ['leader', 'leader*']: tdLog.notice(" === create database replica only 1 role leader check success of vgroup_id {} ======".format(k)) else: tdLog.exit(" === create database replica only 1 role leader check fail of vgroup_id {} ======".format(k)) diff --git a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups_stopOne.py b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups_stopOne.py index 5475d1cc37..00f20abe84 100644 --- a/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups_stopOne.py +++ b/tests/system-test/6-cluster/vnode/4dnode1mnode_basic_replica3_vgroups_stopOne.py @@ -118,12 +118,12 @@ class TDTestCase: vgroup_id = vgroup_info[0] tmp_list = [] for role in vgroup_info[3:-4]: - if role in ['leader','follower']: + if role in ['leader','leader*','follower']: tmp_list.append(role) vgroups_infos[vgroup_id]=tmp_list for k , v in vgroups_infos.items(): - if len(v) ==1 and v[0]=="leader": + if len(v) ==1 and v[0] in ['leader', 'leader*']: tdLog.notice(" === create database replica only 1 role leader check success of vgroup_id {} ======".format(k)) else: tdLog.exit(" === create database replica only 1 role leader check fail of vgroup_id {} ======".format(k)) -- GitLab