git.iko.soy/distributed-process
on master help sign in
Give us a chance to better understand CI failures
commitc04f637309d40e8598b7a1139ed4178353eb50de authorTim Watson <watson.timothy@gmail.com> dateSun 25 Nov 2018, 12:43 (8 years ago) parentba4d0a4
1 file changed+7−3
distributed-process-tests/src/Control/Distributed/Process/Tests/CH.hs+7−3
distributed-process-tests/src/Control/Distributed/Process/Tests/CH.hs+7−3
@@ -1560,7 +1560,9 @@ testRegistryMonitoring TestTransport{..} = do
15601560
15611561 let nid = localNodeId node2
15621562 pid <- forkProcess node1 $ do
1563− getSelfPid >>= runUntilRegistered nid
1563+ self <- getSelfPid
1564+ runUntilRegistered nid self
1565+ say $ regName ++ " registered to " ++ show self
15641566 liftIO $ takeMVar waitH
15651567
15661568 runProcess node2 $ do
@@ -1594,7 +1596,9 @@ testRegistryMonitoring TestTransport{..} = do
15941596 regHere <- newEmptyMVar
15951597 runProcess node2 $ whereis regName >>= liftIO . putMVar regHere
15961598 res <- takeMVar regHere
1597− assertBool "expected Nothing, but process still registered" (res == Nothing)
1599+ case res of
1600+ Nothing -> return ()
1601+ Just pid -> assertBool ("expected Nothing, but got " ++ show pid) False
15981602
15991603 where
16001604 runUntilRegistered nid us = do
@@ -1607,7 +1611,7 @@ testRegistryMonitoring TestTransport{..} = do
16071611 delayUntilMaybeUnregistered nid p = do
16081612 whereisRemoteAsync nid regName
16091613 receiveTimeout 20000000 {- 20 sec delay -} [
1610− matchIf (\(WhereIsReply n p) -> n == regName && p == Nothing)
1614+ matchIf (\(WhereIsReply n p) -> n == regName && isNothing p)
16111615 (const $ return ())
16121616 ]
16131617 return ()