git.iko.soy/distributed-process
on master help sign in
make UForward test case less likely to block indefinitely
1e43976Tim Watson
distributed-process-tests/src/Control/Distributed/Process/Tests/CH.hs+3−4
@@ -947,9 +947,7 @@ testUSend usendPrim TestTransport{..} numMessages = do
947 isSorted _ = True
947 isSorted _ = True
948 -- The list can't be null since there are no failures after sending
948 -- The list can't be null since there are no failures after sending
949 -- the last message.
949 -- the last message.
950− liftIO $ do
950+ liftIO $ putMVar usendTestOk $ isSorted msgs && not (null msgs)
951− assertBool "Unexpected failure after sending last msg" $ isSorted msgs && not (null msgs)
952− putMVar usendTestOk ()
953
951
954 forkProcess node2 $ do
952 forkProcess node2 $ do
955 them <- liftIO $ readMVar processA
953 them <- liftIO $ readMVar processA
@@ -960,7 +958,8 @@ testUSend usendPrim TestTransport{..} numMessages = do
960 usendPrim them i
958 usendPrim them i
961 liftIO (threadDelay 30000)
959 liftIO (threadDelay 30000)
962
960
963− takeMVar usendTestOk
961+ res <- takeMVar usendTestOk
962+ assertBool "Unexpected failure after sending last msg" res
964
963
965-- | Test 'matchAny'. This repeats the 'testMath' but with a proxy server
964-- | Test 'matchAny'. This repeats the 'testMath' but with a proxy server
966-- in between
965-- in between