From 3e63f00f636eac897d58264733ec34d400598b19 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 22 Apr 2021 10:03:35 -0400 Subject: [PATCH] reorder another test continuing to try to narrow down cause of failure on windows --- Command/TestRemote.hs | 8 ++++---- ...t_4_2666b31db5f09778073fdad17b9d8139._comment | 16 ++++++++++++++++ 2 files changed, 20 insertions(+), 4 deletions(-) create mode 100644 doc/bugs/tests_fail_on_windows__58___retrieveKeyFile_resume/comment_4_2666b31db5f09778073fdad17b9d8139._comment diff --git a/Command/TestRemote.hs b/Command/TestRemote.hs index 43aa615b4d..79e0edd6af 100644 --- a/Command/TestRemote.hs +++ b/Command/TestRemote.hs @@ -247,10 +247,6 @@ test runannex mkr mkk = , check "storeKey when already present" $ \r k -> whenwritable r $ runBool (store r k) , check ("present " ++ show True) $ \r k -> present r k True - , check "retrieveKeyFile" $ \r k -> do - lockContentForRemoval k noop removeAnnex - get r k - , check "fsck downloaded object" fsck , check "retrieveKeyFile resume from 0" $ \r k -> do tmp <- fromRawFilePath <$> prepTmp k liftIO $ writeFile tmp "" @@ -274,6 +270,10 @@ test runannex mkr mkk = lockContentForRemoval k noop removeAnnex get r k , check "fsck downloaded object" fsck + , check "retrieveKeyFile" $ \r k -> do + lockContentForRemoval k noop removeAnnex + get r k + , check "fsck downloaded object" fsck , check "removeKey when present" $ \r k -> whenwritable r $ runBool (remove r k) , check ("present " ++ show False) $ \r k -> diff --git a/doc/bugs/tests_fail_on_windows__58___retrieveKeyFile_resume/comment_4_2666b31db5f09778073fdad17b9d8139._comment b/doc/bugs/tests_fail_on_windows__58___retrieveKeyFile_resume/comment_4_2666b31db5f09778073fdad17b9d8139._comment new file mode 100644 index 0000000000..f7c4e4c491 --- /dev/null +++ b/doc/bugs/tests_fail_on_windows__58___retrieveKeyFile_resume/comment_4_2666b31db5f09778073fdad17b9d8139._comment @@ -0,0 +1,16 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 4""" + date="2021-04-22T13:40:33Z" + content=""" +Problem is confirmed to not be from the 33% test, the 0% test failed when +run before it, also in the removeAnnex part. And removeAnnex didn't change +lately, so it seems probably an earlier test sets up the failure. + +I've moved the 0% test to be the first test that retrieves the file, let's +see if it succeeds that way, and if so, it must be that retrieveKeyFile is +leaking a file handle, despite using withBinaryFile which is supposed to +close handles automatically. + +ghc version used for this windows build is 8.8.4 btw. +"""]]