-
Notifications
You must be signed in to change notification settings - Fork 48
Open
Description
I played with the buildTestBracketed feature today and got the impression,
that the cleanup happens too early.
My guess is, that cleanup should only be called after taking all mvars:
diff --git a/core/Test/Framework/Runners/Core.hs b/core/Test/Framework/Runners/Core.hs
index 6e15b0a..42db5b7 100644
--- a/core/Test/Framework/Runners/Core.hs
+++ b/core/Test/Framework/Runners/Core.hs
@@ -105,7 +105,7 @@ instance TestRunner StdRunner where
--
-- FIXME: this is a bit of a hack because it uses one pool thread just waiting
-- for some other pool threads to complete! Switch to parallel-io?
- return $ Just (run_test, actions' ++ [(cleanup >> mapM_ takeMVar mvars)])
+ return $ Just (run_test, actions' ++ [(mapM_ takeMVar mvars >> cleanup)])
runTests' :: [StdRunner] -> IO ([RunningTest], [IO ()])
runTests' = fmap (onRight concat . unzip . catMaybes) . mapM run
Metadata
Metadata
Assignees
Labels
No labels