Răsfoiți Sursa

fix test_extract_continue for hfs timestamp granularity

Thomas Waldmann 2 ani în urmă
părinte
comite
0744b7a241
1 a modificat fișierele cu 2 adăugiri și 0 ștergeri
  1. 2 0
      src/borg/testsuite/archiver/extract_cmd.py

+ 2 - 0
src/borg/testsuite/archiver/extract_cmd.py

@@ -1,6 +1,7 @@
 import errno
 import os
 import shutil
+import time
 import unittest
 from unittest.mock import patch
 
@@ -643,6 +644,7 @@ class ArchiverTestCase(ArchiverTestCaseBase):
             # make a hardlink, so it does not free the inode when unlinking input/file3
             os.link("input/file3", "hardlink-to-keep-inode-f3")
             os.remove("input/file3")
+        time.sleep(1)  # needed due to timestamp granularity of apple hfs+
         with changedir("output"):
             # now try to continue extracting, using the same archive, same output dir:
             self.cmd(f"--repo={self.repository_location}", "extract", "arch", "--continue")