提交 4968b11a 编写于 作者: S Shengliang Guan

test: adjust case

上级 39e303b7
...@@ -61,7 +61,7 @@ class TDTestCase: ...@@ -61,7 +61,7 @@ class TDTestCase:
# only for 1 mnode # only for 1 mnode
mnode_name = k mnode_name = k
if v[2] =='leader': if v[2] in ['leader', 'leader*']:
is_leader=True is_leader=True
if count==1 and is_leader: if count==1 and is_leader:
...@@ -109,12 +109,12 @@ class TDTestCase: ...@@ -109,12 +109,12 @@ class TDTestCase:
vgroup_id = vgroup_info[0] vgroup_id = vgroup_info[0]
tmp_list = [] tmp_list = []
for role in vgroup_info[3:-4]: for role in vgroup_info[3:-4]:
if role in ['leader','follower']: if role in ['leader', 'leader*', 'follower']:
tmp_list.append(role) tmp_list.append(role)
vgroups_infos[vgroup_id]=tmp_list vgroups_infos[vgroup_id]=tmp_list
for k , v in vgroups_infos.items(): 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)) tdLog.notice(" === create database replica only 1 role leader check success of vgroup_id {} ======".format(k))
else: else:
tdLog.exit(" === create database replica only 1 role leader check fail of vgroup_id {} ======".format(k)) tdLog.exit(" === create database replica only 1 role leader check fail of vgroup_id {} ======".format(k))
......
...@@ -115,12 +115,12 @@ class TDTestCase: ...@@ -115,12 +115,12 @@ class TDTestCase:
vgroup_id = vgroup_info[0] vgroup_id = vgroup_info[0]
tmp_list = [] tmp_list = []
for role in vgroup_info[3:-4]: for role in vgroup_info[3:-4]:
if role in ['leader','follower']: if role in ['leader','leader*','follower']:
tmp_list.append(role) tmp_list.append(role)
vgroups_infos[vgroup_id]=tmp_list vgroups_infos[vgroup_id]=tmp_list
for k , v in vgroups_infos.items(): 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)) tdLog.notice(" === create database replica only 1 role leader check success of vgroup_id {} ======".format(k))
else: else:
tdLog.exit(" === create database replica only 1 role leader check fail of vgroup_id {} ======".format(k)) tdLog.exit(" === create database replica only 1 role leader check fail of vgroup_id {} ======".format(k))
......
...@@ -116,12 +116,12 @@ class TDTestCase: ...@@ -116,12 +116,12 @@ class TDTestCase:
vgroup_id = vgroup_info[0] vgroup_id = vgroup_info[0]
tmp_list = [] tmp_list = []
for role in vgroup_info[3:-4]: for role in vgroup_info[3:-4]:
if role in ['leader','follower']: if role in ['leader','leader*','follower']:
tmp_list.append(role) tmp_list.append(role)
vgroups_infos[vgroup_id]=tmp_list vgroups_infos[vgroup_id]=tmp_list
for k , v in vgroups_infos.items(): 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)) tdLog.notice(" === create database replica only 1 role leader check success of vgroup_id {} ======".format(k))
else: else:
tdLog.exit(" === create database replica only 1 role leader check fail of vgroup_id {} ======".format(k)) tdLog.exit(" === create database replica only 1 role leader check fail of vgroup_id {} ======".format(k))
......
...@@ -115,12 +115,12 @@ class TDTestCase: ...@@ -115,12 +115,12 @@ class TDTestCase:
vgroup_id = vgroup_info[0] vgroup_id = vgroup_info[0]
tmp_list = [] tmp_list = []
for role in vgroup_info[3:-4]: for role in vgroup_info[3:-4]:
if role in ['leader','follower']: if role in ['leader','leader*','follower']:
tmp_list.append(role) tmp_list.append(role)
vgroups_infos[vgroup_id]=tmp_list vgroups_infos[vgroup_id]=tmp_list
for k , v in vgroups_infos.items(): 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)) tdLog.notice(" === create database replica only 1 role leader check success of vgroup_id {} ======".format(k))
else: else:
tdLog.exit(" === create database replica only 1 role leader check fail of vgroup_id {} ======".format(k)) tdLog.exit(" === create database replica only 1 role leader check fail of vgroup_id {} ======".format(k))
......
...@@ -116,12 +116,12 @@ class TDTestCase: ...@@ -116,12 +116,12 @@ class TDTestCase:
vgroup_id = vgroup_info[0] vgroup_id = vgroup_info[0]
tmp_list = [] tmp_list = []
for role in vgroup_info[3:-4]: for role in vgroup_info[3:-4]:
if role in ['leader','follower']: if role in ['leader','leader*','follower']:
tmp_list.append(role) tmp_list.append(role)
vgroups_infos[vgroup_id]=tmp_list vgroups_infos[vgroup_id]=tmp_list
for k , v in vgroups_infos.items(): 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)) tdLog.notice(" === create database replica only 1 role leader check success of vgroup_id {} ======".format(k))
else: else:
tdLog.exit(" === create database replica only 1 role leader check fail of vgroup_id {} ======".format(k)) tdLog.exit(" === create database replica only 1 role leader check fail of vgroup_id {} ======".format(k))
......
...@@ -119,12 +119,12 @@ class TDTestCase: ...@@ -119,12 +119,12 @@ class TDTestCase:
vgroup_id = vgroup_info[0] vgroup_id = vgroup_info[0]
tmp_list = [] tmp_list = []
for role in vgroup_info[3:-4]: for role in vgroup_info[3:-4]:
if role in ['leader','follower']: if role in ['leader','leader*','follower']:
tmp_list.append(role) tmp_list.append(role)
vgroups_infos[vgroup_id]=tmp_list vgroups_infos[vgroup_id]=tmp_list
for k , v in vgroups_infos.items(): 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)) tdLog.notice(" === create database replica only 1 role leader check success of vgroup_id {} ======".format(k))
else: else:
tdLog.exit(" === create database replica only 1 role leader check fail of vgroup_id {} ======".format(k)) tdLog.exit(" === create database replica only 1 role leader check fail of vgroup_id {} ======".format(k))
......
...@@ -118,12 +118,12 @@ class TDTestCase: ...@@ -118,12 +118,12 @@ class TDTestCase:
vgroup_id = vgroup_info[0] vgroup_id = vgroup_info[0]
tmp_list = [] tmp_list = []
for role in vgroup_info[3:-4]: for role in vgroup_info[3:-4]:
if role in ['leader','follower']: if role in ['leader','leader*','follower']:
tmp_list.append(role) tmp_list.append(role)
vgroups_infos[vgroup_id]=tmp_list vgroups_infos[vgroup_id]=tmp_list
for k , v in vgroups_infos.items(): 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)) tdLog.notice(" === create database replica only 1 role leader check success of vgroup_id {} ======".format(k))
else: else:
tdLog.exit(" === create database replica only 1 role leader check fail of vgroup_id {} ======".format(k)) tdLog.exit(" === create database replica only 1 role leader check fail of vgroup_id {} ======".format(k))
......
...@@ -118,12 +118,12 @@ class TDTestCase: ...@@ -118,12 +118,12 @@ class TDTestCase:
vgroup_id = vgroup_info[0] vgroup_id = vgroup_info[0]
tmp_list = [] tmp_list = []
for role in vgroup_info[3:-4]: for role in vgroup_info[3:-4]:
if role in ['leader','follower']: if role in ['leader','leader*','follower']:
tmp_list.append(role) tmp_list.append(role)
vgroups_infos[vgroup_id]=tmp_list vgroups_infos[vgroup_id]=tmp_list
for k , v in vgroups_infos.items(): 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)) tdLog.notice(" === create database replica only 1 role leader check success of vgroup_id {} ======".format(k))
else: else:
tdLog.exit(" === create database replica only 1 role leader check fail of vgroup_id {} ======".format(k)) tdLog.exit(" === create database replica only 1 role leader check fail of vgroup_id {} ======".format(k))
......
...@@ -124,12 +124,12 @@ class TDTestCase: ...@@ -124,12 +124,12 @@ class TDTestCase:
vgroup_id = vgroup_info[0] vgroup_id = vgroup_info[0]
tmp_list = [] tmp_list = []
for role in vgroup_info[3:-4]: for role in vgroup_info[3:-4]:
if role in ['leader','follower']: if role in ['leader','leader*','follower']:
tmp_list.append(role) tmp_list.append(role)
vgroups_infos[vgroup_id]=tmp_list vgroups_infos[vgroup_id]=tmp_list
for k , v in vgroups_infos.items(): 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)) tdLog.notice(" === create database replica only 1 role leader check success of vgroup_id {} ======".format(k))
else: else:
tdLog.exit(" === create database replica only 1 role leader check fail of vgroup_id {} ======".format(k)) tdLog.exit(" === create database replica only 1 role leader check fail of vgroup_id {} ======".format(k))
......
...@@ -124,12 +124,12 @@ class TDTestCase: ...@@ -124,12 +124,12 @@ class TDTestCase:
vgroup_id = vgroup_info[0] vgroup_id = vgroup_info[0]
tmp_list = [] tmp_list = []
for role in vgroup_info[3:-4]: for role in vgroup_info[3:-4]:
if role in ['leader','follower']: if role in ['leader','leader*','follower']:
tmp_list.append(role) tmp_list.append(role)
vgroups_infos[vgroup_id]=tmp_list vgroups_infos[vgroup_id]=tmp_list
for k , v in vgroups_infos.items(): 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)) tdLog.notice(" === create database replica only 1 role leader check success of vgroup_id {} ======".format(k))
else: else:
tdLog.exit(" === create database replica only 1 role leader check fail of vgroup_id {} ======".format(k)) tdLog.exit(" === create database replica only 1 role leader check fail of vgroup_id {} ======".format(k))
......
...@@ -124,12 +124,12 @@ class TDTestCase: ...@@ -124,12 +124,12 @@ class TDTestCase:
vgroup_id = vgroup_info[0] vgroup_id = vgroup_info[0]
tmp_list = [] tmp_list = []
for role in vgroup_info[3:-4]: for role in vgroup_info[3:-4]:
if role in ['leader','follower']: if role in ['leader','leader*','follower']:
tmp_list.append(role) tmp_list.append(role)
vgroups_infos[vgroup_id]=tmp_list vgroups_infos[vgroup_id]=tmp_list
for k , v in vgroups_infos.items(): 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)) tdLog.notice(" === create database replica only 1 role leader check success of vgroup_id {} ======".format(k))
else: else:
tdLog.exit(" === create database replica only 1 role leader check fail of vgroup_id {} ======".format(k)) tdLog.exit(" === create database replica only 1 role leader check fail of vgroup_id {} ======".format(k))
......
...@@ -207,12 +207,12 @@ class TDTestCase: ...@@ -207,12 +207,12 @@ class TDTestCase:
vgroup_id = vgroup_info[0] vgroup_id = vgroup_info[0]
tmp_list = [] tmp_list = []
for role in vgroup_info[3:-4]: for role in vgroup_info[3:-4]:
if role in ['leader','follower']: if role in ['leader','leader*','follower']:
tmp_list.append(role) tmp_list.append(role)
vgroups_infos[vgroup_id]=tmp_list vgroups_infos[vgroup_id]=tmp_list
for k , v in vgroups_infos.items(): 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)) tdLog.notice(" === create database replica only 1 role leader check success of vgroup_id {} ======".format(k))
else: else:
tdLog.exit(" === create database replica only 1 role leader check fail of vgroup_id {} ======".format(k)) tdLog.exit(" === create database replica only 1 role leader check fail of vgroup_id {} ======".format(k))
......
...@@ -116,12 +116,12 @@ class TDTestCase: ...@@ -116,12 +116,12 @@ class TDTestCase:
vgroup_id = vgroup_info[0] vgroup_id = vgroup_info[0]
tmp_list = [] tmp_list = []
for role in vgroup_info[3:-4]: for role in vgroup_info[3:-4]:
if role in ['leader','follower']: if role in ['leader','leader*','follower']:
tmp_list.append(role) tmp_list.append(role)
vgroups_infos[vgroup_id]=tmp_list vgroups_infos[vgroup_id]=tmp_list
for k , v in vgroups_infos.items(): 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)) tdLog.notice(" === create database replica only 1 role leader check success of vgroup_id {} ======".format(k))
else: else:
tdLog.exit(" === create database replica only 1 role leader check fail of vgroup_id {} ======".format(k)) tdLog.exit(" === create database replica only 1 role leader check fail of vgroup_id {} ======".format(k))
......
...@@ -115,12 +115,12 @@ class TDTestCase: ...@@ -115,12 +115,12 @@ class TDTestCase:
vgroup_id = vgroup_info[0] vgroup_id = vgroup_info[0]
tmp_list = [] tmp_list = []
for role in vgroup_info[3:-4]: for role in vgroup_info[3:-4]:
if role in ['leader','follower']: if role in ['leader','leader*','follower']:
tmp_list.append(role) tmp_list.append(role)
vgroups_infos[vgroup_id]=tmp_list vgroups_infos[vgroup_id]=tmp_list
for k , v in vgroups_infos.items(): 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)) tdLog.notice(" === create database replica only 1 role leader check success of vgroup_id {} ======".format(k))
else: else:
tdLog.exit(" === create database replica only 1 role leader check fail of vgroup_id {} ======".format(k)) tdLog.exit(" === create database replica only 1 role leader check fail of vgroup_id {} ======".format(k))
......
...@@ -118,12 +118,12 @@ class TDTestCase: ...@@ -118,12 +118,12 @@ class TDTestCase:
vgroup_id = vgroup_info[0] vgroup_id = vgroup_info[0]
tmp_list = [] tmp_list = []
for role in vgroup_info[3:-4]: for role in vgroup_info[3:-4]:
if role in ['leader','follower']: if role in ['leader','leader*','follower']:
tmp_list.append(role) tmp_list.append(role)
vgroups_infos[vgroup_id]=tmp_list vgroups_infos[vgroup_id]=tmp_list
for k , v in vgroups_infos.items(): 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)) tdLog.notice(" === create database replica only 1 role leader check success of vgroup_id {} ======".format(k))
else: else:
tdLog.exit(" === create database replica only 1 role leader check fail of vgroup_id {} ======".format(k)) tdLog.exit(" === create database replica only 1 role leader check fail of vgroup_id {} ======".format(k))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册