1
0
mirror of https://github.com/rclone/rclone.git synced 2025-12-06 00:03:32 +00:00

vfs: convert time.Duration option to fs.Duration

This commit is contained in:
Nick Craig-Wood
2024-07-02 17:31:51 +01:00
parent 2c57fe9826
commit fc1d8dafd5
17 changed files with 66 additions and 66 deletions

View File

@@ -722,7 +722,7 @@ func TestRWCacheUpdate(t *testing.T) {
opt := vfscommon.DefaultOpt
opt.CacheMode = vfscommon.CacheModeFull
opt.WriteBack = writeBackDelay
opt.DirCacheTime = 100 * time.Millisecond
opt.DirCacheTime = fs.Duration(100 * time.Millisecond)
r, vfs := newTestVFSOpt(t, &opt)
if r.Fremote.Precision() == fs.ModTimeNotSupported {
@@ -744,7 +744,7 @@ func TestRWCacheUpdate(t *testing.T) {
r.CheckRemoteItems(t, file1)
// Wait for directory cache to expire
time.Sleep(2 * opt.DirCacheTime)
time.Sleep(time.Duration(2 * opt.DirCacheTime))
// Check the file is OK via the VFS
data, err := vfs.ReadFile(filename)