From 8d191c19a50a4e8bc91217b15613e628b74725c9 Mon Sep 17 00:00:00 2001 From: Michael Eischer Date: Sat, 20 Jun 2026 21:55:46 +0200 Subject: [PATCH] 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+. --- internal/archiver/archiver_test.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/internal/archiver/archiver_test.go b/internal/archiver/archiver_test.go index 76a9f2488..e856fa2b9 100644 --- a/internal/archiver/archiver_test.go +++ b/internal/archiver/archiver_test.go @@ -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) {