فهرست منبع

tests: fix diff cmd test on macOS HFS+, fixes #8860

If we touch too quickly after file creation, it would not noticably update the timestamp.
Thomas Waldmann 2 هفته پیش
والد
کامیت
77eb5992fe
1فایلهای تغییر یافته به همراه1 افزوده شده و 0 حذف شده
  1. 1 0
      src/borg/testsuite/archiver.py

+ 1 - 0
src/borg/testsuite/archiver.py

@@ -4585,6 +4585,7 @@ class DiffArchiverTestCase(ArchiverTestCaseBase):
         self.create_regular_file('file_replaced', contents=b'0' * 4096)
         os.unlink('input/file_removed')
         os.unlink('input/file_removed2')
+        time.sleep(1)  # macOS HFS+ has a 1s timestamp granularity
         Path('input/file_touched').touch()
         os.rmdir('input/dir_replaced_with_file')
         self.create_regular_file('dir_replaced_with_file', size=8192)