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 = None
|
||||
gc.collect()
|
||||
time.sleep(1)
|
||||
os.unlink(self.db_tmp_path)
|
||||
retries = 0
|
||||
while retries < 5:
|
||||
try:
|
||||
os.unlink(self.db_tmp_path)
|
||||
break
|
||||
except:
|
||||
time.sleep(1)
|
||||
retries += 1
|
||||
shutil.rmtree(self.tmp_folder)
|
||||
|
||||
def delete_column_test(self):
|
||||
|
Loading…
Reference in New Issue
Block a user