From af6068525ae555045fc7a6542e184ada18342d45 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 14 Aug 2017 15:11:42 -0400 Subject: [PATCH] Fix a git-annex test failure when run on NFS due to NFS lock files preventing directory removal. Should fix this: lock (v6 --force): FAIL Exception: .git/annex/keys: removeDirectoryRecursive: unsatisfied constraints (Directory not empty) Verified that the test case still catches the regression it's meant to. This commit was supported by the NSF-funded DataLad project. --- CHANGELOG | 2 ++ Test.hs | 2 ++ 2 files changed, 4 insertions(+) diff --git a/CHANGELOG b/CHANGELOG index 52b67f6001..a568407e25 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -5,6 +5,8 @@ git-annex (6.20170521) UNRELEASED; urgency=medium * Added GIT_ANNEX_VECTOR_CLOCK environment variable, which can be used to override the default timestamps used in log files in the git-annex branch. This is a dangerous environment variable; use with caution. + * Fix a git-annex test failure when run on NFS due to NFS lock files + preventing directory removal. -- Joey Hess Sat, 17 Jun 2017 13:02:24 -0400 diff --git a/Test.hs b/Test.hs index 1e72363a38..6fcdad0c19 100644 --- a/Test.hs +++ b/Test.hs @@ -70,6 +70,7 @@ import qualified Types.Messages import qualified Config import qualified Config.Cost import qualified Crypto +import qualified Database.Keys import qualified Annex.WorkTree import qualified Annex.Link import qualified Annex.Init @@ -652,6 +653,7 @@ test_lock_v6_force = intmpclonerepoInDirect $ do git_annex "get" [annexedfile] @? "get of file failed" git_annex "unlock" [annexedfile] @? "unlock failed in v6 mode" annexeval $ do + Database.Keys.closeDb dbdir <- Annex.fromRepo Annex.Locations.gitAnnexKeysDb liftIO $ removeDirectoryRecursive dbdir writeFile annexedfile "test_lock_v6_force content"