Merge pull request #27078 from taosdata/case/TD-31176-3.0

fix: restore delete_check.py case
This commit is contained in:
Alex Duan 2024-08-10 12:09:55 +08:00 committed by GitHub
commit 1c6ca34732
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 17 additions and 4 deletions

View File

@ -342,7 +342,7 @@
,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/splitVGroup.py -N 3 -n 3
,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/splitVGroupWal.py -N 3 -n 3
,,n,system-test,python3 ./test.py -f 0-others/timeRangeWise.py -N 3
#,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/delete_check.py
,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/delete_check.py
,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/test_hot_refresh_configurations.py
,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/subscribe_stream_privilege.py
,,y,system-test,./pytest.sh python3 ./test.py -f 0-others/empty_identifier.py

View File

@ -47,9 +47,9 @@ class TDTestCase:
def compactDatbase(self):
# compact database
tdSql.execute(f"compact database {self.dbname}", show=True)
waitSeconds = 20
if self.waitTranslation(waitSeconds) == False:
tdLog.exit(f"translation can not finish after wait {waitSeconds} seconds")
waitSeconds = 60
if self.waitCompacts(waitSeconds) == False:
tdLog.exit(f"compacts can not finish after wait {waitSeconds} seconds")
return
# check tsdb folder empty
@ -108,6 +108,19 @@ class TDTestCase:
return False
def waitCompacts(self, waitSeconds):
# wait end
for i in range(waitSeconds):
sql ="show compacts;"
rows = tdSql.query(sql)
if rows == 0:
return True
tdLog.info(f"i={i} wait for translation finish ...")
time.sleep(1)
return False
# run
def run(self):
# seed