From 94319c360bf28b88dd41b2ab18d073ab67db0073 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Thu, 29 Oct 2026 15:11:33 +0000 Subject: [PATCH] vfs: retry finding the object in the test which checks modtime support canSetModTime looked up the object it had just written without any retries, so on backends with read-after-write lag such as Internxt the lookup failed. As the result is only worked out once, the remaining TestFileSetModTime subtests then ran assuming the modtime could be set. --- vfs/write_test.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/vfs/write_test.go b/vfs/write_test.go index 518bc2b2c..b49d2cb70 100644 --- a/vfs/write_test.go +++ b/vfs/write_test.go @@ -337,10 +337,9 @@ func canSetModTime(t *testing.T, r *fstest.Run) bool { canSetModTimeOnce.Do(func() { mtime1 := time.Date(2008, time.November, 18, 17, 32, 31, 0, time.UTC) _ = r.WriteObject(context.Background(), "time_test", "stuff", mtime1) - obj, err := r.Fremote.NewObject(context.Background(), "time_test") - require.NoError(t, err) + obj := fstest.NewObject(context.Background(), t, r.Fremote, "time_test") mtime2 := time.Date(2009, time.November, 18, 17, 32, 31, 0, time.UTC) - err = obj.SetModTime(context.Background(), mtime2) + err := obj.SetModTime(context.Background(), mtime2) switch err { case nil: canSetModTimeValue = true