mirror of
https://github.com/restic/restic.git
synced 2026-06-27 11:04:17 +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:
@@ -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