forked from openlp/openlp
Add a retry mechanism
This commit is contained in:
parent
d7b9e2cbe5
commit
b11b88f4eb
@ -57,8 +57,14 @@ class TestUtilsDBFunctions(TestCase):
|
|||||||
self.session.close()
|
self.session.close()
|
||||||
self.session = None
|
self.session = None
|
||||||
gc.collect()
|
gc.collect()
|
||||||
time.sleep(1)
|
retries = 0
|
||||||
os.unlink(self.db_tmp_path)
|
while retries < 5:
|
||||||
|
try:
|
||||||
|
os.unlink(self.db_tmp_path)
|
||||||
|
break
|
||||||
|
except:
|
||||||
|
time.sleep(1)
|
||||||
|
retries += 1
|
||||||
shutil.rmtree(self.tmp_folder)
|
shutil.rmtree(self.tmp_folder)
|
||||||
|
|
||||||
def delete_column_test(self):
|
def delete_column_test(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user