haskellPackages.threads: add workaround for flaky test (#467518)
This commit is contained in:
@@ -2129,4 +2129,7 @@ builtins.intersectAttrs super {
|
||||
cpython = doJailbreak super.cpython;
|
||||
|
||||
botan-bindings = super.botan-bindings.override { botan = pkgs.botan3; };
|
||||
|
||||
# Workaround for flaky test: https://github.com/basvandijk/threads/issues/10
|
||||
threads = appendPatch ./patches/threads-flaky-test.patch super.threads;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
diff --git a/test/test.hs b/test/test.hs
|
||||
index 0251552..dc799a7 100644
|
||||
--- a/test/test.hs
|
||||
+++ b/test/test.hs
|
||||
@@ -214,7 +214,7 @@ wrap :: (ThreadGroup -> Fork a) -> (Fork a -> IO b) -> IO b
|
||||
wrap doFork test = ThreadGroup.new >>= test . doFork
|
||||
|
||||
test_group_single_wait :: (ThreadGroup -> Fork ()) -> Assertion
|
||||
-test_group_single_wait doFork = assert $ fmap isJustTrue $ timeout (10 * a_moment) $ do
|
||||
+test_group_single_wait doFork = assert $ fmap isJustTrue $ timeout (100 * a_moment) $ do
|
||||
tg <- ThreadGroup.new
|
||||
r <- newIORef False
|
||||
_ <- doFork tg $ do
|
||||
Reference in New Issue
Block a user