fix/TS-5251-add-conflict-check-fix-case

This commit is contained in:
dmchen 2024-10-31 08:29:11 +00:00
parent 3b23031a44
commit cea72bb365
2 changed files with 17 additions and 0 deletions

View File

@ -97,6 +97,11 @@ class TDTestCase(TBase):
self.alterReplica(1)
self.checkAggCorrect()
self.compactDb()
if self.waitCompactsZero() is False:
tdLog.exit(f"compact not finished")
return False
self.alterReplica3()
vgids = self.getVGroup(self.db)

View File

@ -283,6 +283,18 @@ class TBase:
time.sleep(interval)
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
def checkFileExist(self, pathFile):