Fix ci problems.
This commit is contained in:
parent
b38ac6abbf
commit
d1ef88eba4
|
@ -57,11 +57,11 @@ class TDTestCase(TBase):
|
|||
|
||||
tdSql.query("show db.vgroups;")
|
||||
|
||||
if(tdSql.getData(0, 4) == "follower") and (tdSql.getData(0, 6) == "leader"):
|
||||
if(tdSql.getData(0, 4) == "follower") and (tdSql.getData(0, 7) == "leader"):
|
||||
tdLog.info("stop dnode2")
|
||||
sc.dnodeStop(2)
|
||||
|
||||
if(tdSql.getData(0, 6) == "follower") and (tdSql.getData(0, 4) == "leader"):
|
||||
if(tdSql.getData(0, 7) == "follower") and (tdSql.getData(0, 4) == "leader"):
|
||||
tdLog.info("stop dnode 3")
|
||||
sc.dnodeStop(3)
|
||||
|
||||
|
@ -70,7 +70,7 @@ class TDTestCase(TBase):
|
|||
while count < 100:
|
||||
tdSql.query("show db.vgroups;")
|
||||
|
||||
if(tdSql.getData(0, 4) == "assigned ") or (tdSql.getData(0, 6) == "assigned "):
|
||||
if(tdSql.getData(0, 4) == "assigned ") or (tdSql.getData(0, 7) == "assigned "):
|
||||
break
|
||||
|
||||
tdLog.info("wait 1 seconds for set assigned")
|
||||
|
|
|
@ -301,6 +301,18 @@ class ClusterComCheck:
|
|||
if tdSql.res[0][0] == db_replica:
|
||||
tdLog.success(f"elections of {db_name}.vgroups with replica {self.db_replica} are ready in {count} s")
|
||||
return True
|
||||
|
||||
vgruop_apply_commit_first = [tdSql.res[0][5],tdSql.res[0][8],tdSql.res[0][11]]
|
||||
vgruop_apply_commit_end = [tdSql.res[last_number][5],tdSql.res[last_number][8],tdSql.res[last_number][11]]
|
||||
for i in range(3):
|
||||
v = vgruop_apply_commit_first[i].split('/')
|
||||
assert (int(v[0]) <= int(v[1])) ,f"apply {v[0]} > commit {v[1]}"
|
||||
|
||||
v = vgruop_apply_commit_end[i].split('/')
|
||||
assert (int(v[0]) <= int(v[1])) ,f"apply {v[0]} > commit {v[1]}"
|
||||
|
||||
|
||||
|
||||
else:
|
||||
tdLog.debug(tdSql.res)
|
||||
tdLog.notice(f"elections of {db_name} all vgroups with replica {self.db_replica} are failed in {count} s ")
|
||||
|
|
|
@ -251,9 +251,9 @@ class ClusterComCheck:
|
|||
return True
|
||||
|
||||
elif self.db_replica == 3 :
|
||||
vgroup_status_first=[tdSql.queryResult[0][4],tdSql.queryResult[0][6],tdSql.queryResult[0][8]]
|
||||
vgroup_status_first=[tdSql.queryResult[0][4],tdSql.queryResult[0][7],tdSql.queryResult[0][10]]
|
||||
|
||||
vgroup_status_last=[tdSql.queryResult[last_number][4],tdSql.queryResult[last_number][6],tdSql.queryResult[last_number][8]]
|
||||
vgroup_status_last=[tdSql.queryResult[last_number][4],tdSql.queryResult[last_number][7],tdSql.queryResult[last_number][10]]
|
||||
if vgroup_status_first.count('leader') == 1 and vgroup_status_first.count('follower') == 2:
|
||||
if vgroup_status_last.count('leader') == 1 and vgroup_status_last.count('follower') == 2:
|
||||
tdSql.query(f"select `replica` from information_schema.ins_databases where `name`='{db_name}';")
|
||||
|
|
Loading…
Reference in New Issue