fix/TS-5251-add-conflict-check-fix-case
This commit is contained in:
parent
3b23031a44
commit
cea72bb365
|
@ -97,6 +97,11 @@ class TDTestCase(TBase):
|
||||||
self.alterReplica(1)
|
self.alterReplica(1)
|
||||||
self.checkAggCorrect()
|
self.checkAggCorrect()
|
||||||
self.compactDb()
|
self.compactDb()
|
||||||
|
|
||||||
|
if self.waitCompactsZero() is False:
|
||||||
|
tdLog.exit(f"compact not finished")
|
||||||
|
return False
|
||||||
|
|
||||||
self.alterReplica3()
|
self.alterReplica3()
|
||||||
|
|
||||||
vgids = self.getVGroup(self.db)
|
vgids = self.getVGroup(self.db)
|
||||||
|
|
|
@ -283,6 +283,18 @@ class TBase:
|
||||||
time.sleep(interval)
|
time.sleep(interval)
|
||||||
|
|
||||||
return False
|
return False
|
||||||
|
def waitCompactsZero(self, seconds = 300, interval = 1):
|
||||||
|
# wait end
|
||||||
|
for i in range(seconds):
|
||||||
|
sql ="show compacts;"
|
||||||
|
rows = tdSql.query(sql)
|
||||||
|
if rows == 0:
|
||||||
|
tdLog.info("compacts count became zero.")
|
||||||
|
return True
|
||||||
|
#tdLog.info(f"i={i} wait ...")
|
||||||
|
time.sleep(interval)
|
||||||
|
|
||||||
|
return False
|
||||||
|
|
||||||
# check file exist
|
# check file exist
|
||||||
def checkFileExist(self, pathFile):
|
def checkFileExist(self, pathFile):
|
||||||
|
|
Loading…
Reference in New Issue