try again to avoid directory removal issues on NFS

af6068525a seems to not have worked;
though the keys database should not have any files open after closeDb,
NFS seems to be creating some files where while the directory is being
removed, which causes the removal to fail.

So instead, try renaming the directory out of the way.

This commit was supported by the NSF-funded DataLad project.
This commit is contained in:
Joey Hess 2017-12-05 14:25:51 -04:00
parent ed701667aa
commit 429132f496
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -675,7 +675,7 @@ test_lock_v6_force = intmpclonerepoInDirect $ do
annexeval $ do
Database.Keys.closeDb
dbdir <- Annex.fromRepo Annex.Locations.gitAnnexKeysDb
liftIO $ removeDirectoryRecursive dbdir
liftIO $ renameDirectory dbdir (dbdir ++ ".old")
writeFile annexedfile "test_lock_v6_force content"
not <$> git_annex "lock" [annexedfile] @? "lock of modified file failed to fail in v6 mode"
git_annex "lock" ["--force", annexedfile] @? "lock --force of modified file failed in v6 mode"