packages feed

lifted-async 0.10.0.1 → 0.10.0.2

raw patch · 4 files changed

+42/−31 lines, 4 filesdep +tasty-expected-failurePVP ok

version bump matches the API change (PVP)

Dependencies added: tasty-expected-failure

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,5 +1,9 @@ # Revision history for lifted-async +## v0.10.0.2 - 2018-05-13++* Allow test_link to fail because it's non-deterministic (#26)+ ## v0.10.0.1 - 2018-03-10  * Relax upper version bound for base in GHC 8.4.1 (#25)
lifted-async.cabal view
@@ -1,5 +1,5 @@ name:                lifted-async-version:             0.10.0.1+version:             0.10.0.2 synopsis:            Run lifted IO operations asynchronously and wait for their results homepage:            https://github.com/maoe/lifted-async bug-reports:         https://github.com/maoe/lifted-async/issues@@ -60,6 +60,7 @@     , monad-control     , mtl     , tasty+    , tasty-expected-failure < 0.12     , tasty-hunit >= 0.9 && < 0.11     , tasty-th 
tests/Test/Async/Reader.hs view
@@ -8,6 +8,7 @@  import Control.Concurrent.Lifted import Control.Exception.Lifted as E+import Test.Tasty.ExpectedFailure  #if MIN_VERSION_monad_control(1, 0, 0) import Control.Concurrent.Async.Lifted.Safe@@ -111,18 +112,20 @@     when (isNothing r') $       liftIO $ assertFailure "The result must not be Nothing." -case_link :: Assertion-case_link = do-  r <- try $ flip runReaderT value $ do-    a <- async $ threadDelay 1000000 >> return value-    link a-    cancelWith a TestException-    wait a-  case r of-    Left e -> case fromException e of-      Just (ExceptionInLinkedThread _ e') ->-        fromException e' @?= Just TestException-      Nothing -> assertFailure $-        "expected ExceptionInLinkedThread _ TestException"-          ++ " but got " ++ show e-    Right _ -> assertFailure "An exception must be raised."+test_ignored :: [TestTree]+test_ignored =+  [ ignoreTestBecause "see #26" $ testCase "link" $ do+    r <- try $ flip runReaderT value $ do+      a <- async $ threadDelay 1000000 >> return value+      link a+      cancelWith a TestException+      wait a+    case r of+      Left e -> case fromException e of+        Just (ExceptionInLinkedThread _ e') ->+          fromException e' @?= Just TestException+        Nothing -> assertFailure $+          "expected ExceptionInLinkedThread _ TestException"+            ++ " but got " ++ show e+      Right _ -> assertFailure "An exception must be raised."+  ]
tests/Test/Async/State.hs view
@@ -7,6 +7,7 @@  import Control.Concurrent.Lifted import Control.Exception.Lifted as E+import Test.Tasty.ExpectedFailure  import Control.Concurrent.Async.Lifted import Test.Async.Common@@ -146,18 +147,20 @@         waitBoth a b   liftIO $ s @?= value -case_link :: Assertion-case_link = do-  r <- try $ flip runStateT value $ do-    a <- async $ threadDelay 1000000 >> return value-    link a-    cancelWith a TestException-    wait a-  case r of-    Left e -> case fromException e of-      Just (ExceptionInLinkedThread _ e') ->-        fromException e' @?= Just TestException-      Nothing -> assertFailure $-        "expected ExceptionInLinkedThread _ TestException"-          ++ " but got " ++ show e-    Right _ -> assertFailure "An exception must be raised."+test_ignored :: [TestTree]+test_ignored =+  [ ignoreTestBecause "see #26" $ testCase "link" $ do+    r <- try $ flip runStateT value $ do+      a <- async $ threadDelay 1000000 >> return value+      link a+      cancelWith a TestException+      wait a+    case r of+      Left e -> case fromException e of+        Just (ExceptionInLinkedThread _ e') ->+          fromException e' @?= Just TestException+        Nothing -> assertFailure $+          "expected ExceptionInLinkedThread _ TestException"+            ++ " but got " ++ show e+      Right _ -> assertFailure "An exception must be raised."+  ]