vfs: fix rename tests by waiting for writes to complete
Before this change the background writing of the file was racing with the test of the object on the remote. This meant that the tests passed locally but failed on a lot of the remotes.
This commit is contained in:
parent
6082096f7e
commit
d2ad293fae
2 changed files with 3 additions and 4 deletions
|
@ -16,10 +16,6 @@ vfs/vfscache/downloaders
|
|||
cmd/cmount
|
||||
"
|
||||
|
||||
testdirs="
|
||||
cmd/cmount
|
||||
"
|
||||
|
||||
for testdir in ${testdirs}; do
|
||||
echo "Testing ${testdir}"
|
||||
cd ${base}/${testdir}
|
||||
|
|
|
@ -265,9 +265,12 @@ func testFileRename(t *testing.T, mode vfscommon.CacheMode, inCache bool, forceC
|
|||
require.NoError(t, err)
|
||||
require.Equal(t, 14, n)
|
||||
|
||||
require.NoError(t, file.SetModTime(item.ModTime))
|
||||
|
||||
err = fd.Close()
|
||||
require.NoError(t, err)
|
||||
}
|
||||
vfs.WaitForWriters(waitForWritersDelay)
|
||||
|
||||
// check file in cache
|
||||
if inCache {
|
||||
|
|
Loading…
Reference in a new issue