mirror of
https://github.com/restic/restic.git
synced 2026-10-18 07:28:12 +00:00
archiver: decrease sleeps for TestFileChanged test
Modern filesystems provide microsecond granularity or better. The old special case for macOS is removed as Go 1.25 (minimum for restic) requires at least macOS 12, which uses APFS instead of the old HFS+.
This commit is contained in:
1 parent
d5267f03e0
commit
8d191c19a5
1 file changed
+1
-7
@@ -572,13 +572,7 @@ func nodeFromFile(t testing.TB, localFs fs.FS, filename string) *data.Node {
|
||||
|
||||
// sleep sleeps long enough to ensure a timestamp change.
|
||||
func sleep() {
|
||||
d := 50 * time.Millisecond
|
||||
if runtime.GOOS == "darwin" {
|
||||
// On older Darwin instances, the file system only supports one second
|
||||
// granularity.
|
||||
d = 1500 * time.Millisecond
|
||||
}
|
||||
time.Sleep(d)
|
||||
time.Sleep(5 * time.Millisecond)
|
||||
}
|
||||
|
||||
func TestFileChanged(t *testing.T) {
|
||||
|
||||
Reference in new issue
Block a user