testsuite: repository: close fd before deleting segment

See last commit.
This commit is contained in:
Rayyan Ansari 2022-11-15 17:19:57 +00:00 committed by Thomas Waldmann
parent 05505de807
commit 9cff9d96fa
No known key found for this signature in database
GPG key ID: 243ACFA951F78E01

View file

@ -720,7 +720,7 @@ class RepositoryCheckTestCase(RepositoryTestCaseBase):
fd.write(b'BOOM')
def delete_segment(self, segment):
os.unlink(os.path.join(self.tmppath, 'repository', 'data', '0', str(segment)))
self.repository.io.delete_segment(segment)
def delete_index(self):
os.unlink(os.path.join(self.tmppath, 'repository', f'index.{self.get_head()}'))