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:
Michael Eischer
2026-06-20 21:55:46 +02:00
parent d5267f03e0
commit 8d191c19a5
+1 -7
View File
@@ -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) {