Skip to content

Commit c04f637

Browse files
committed
Give us a chance to better understand CI failures
1 parent ba4d0a4 commit c04f637

File tree

1 file changed

+7
-3
lines changed
  • distributed-process-tests/src/Control/Distributed/Process/Tests

1 file changed

+7
-3
lines changed

distributed-process-tests/src/Control/Distributed/Process/Tests/CH.hs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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 ()

0 commit comments

Comments
 (0)