git.iko.soy/distributed-process
on master help sign in
make UForward test case less likely to block indefinitely
commit1e4397628f5a61bb37db67291c4bde0b1c13ea9b authorTim Watson <watson.timothy@gmail.com> dateFri 16 Nov 2018, 09:37 (8 years ago) parentc2b515c
1 file changed+3−4
distributed-process-tests/src/Control/Distributed/Process/Tests/CH.hs+3−4
distributed-process-tests/src/Control/Distributed/Process/Tests/CH.hs+3−4
@@ -947,9 +947,7 @@ testUSend usendPrim TestTransport{..} numMessages = do
947947 isSorted _ = True
948948 -- The list can't be null since there are no failures after sending
949949 -- the last message.
950− liftIO $ do
951− assertBool "Unexpected failure after sending last msg" $ isSorted msgs && not (null msgs)
952− putMVar usendTestOk ()
950+ liftIO $ putMVar usendTestOk $ isSorted msgs && not (null msgs)
953951
954952 forkProcess node2 $ do
955953 them <- liftIO $ readMVar processA
@@ -960,7 +958,8 @@ testUSend usendPrim TestTransport{..} numMessages = do
960958 usendPrim them i
961959 liftIO (threadDelay 30000)
962960
963− takeMVar usendTestOk
961+ res <- takeMVar usendTestOk
962+ assertBool "Unexpected failure after sending last msg" res
964963
965964-- | Test 'matchAny'. This repeats the 'testMath' but with a proxy server
966965-- in between