@@ -483,6 +483,20 @@ testMergeChannels transport = do
483 liftIO $ threadDelay 10000 -- Make sure messages have been sent
483 liftIO $ threadDelay 10000 -- Make sure messages have been sent
484 return rport
484 return rport
486+testTerminate :: NT.Transport -> IO ()
487+testTerminate transport = do
488+ localNode <- newLocalNode transport initRemoteTable
490+ pid <- forkProcess localNode $ do
491+ liftIO $ threadDelay 100000
494+ runProcess localNode $ do
496+ MonitorNotification ref' pid' (DiedException ex) <- expect
497+ True <- return $ ref == ref' && pid == pid' && ex == "ProcessTerminationException"
486main :: IO ()
500main :: IO ()
488 Right transport <- createTransport "127.0.0.1" "8080" defaultTCPParameters
502 Right transport <- createTransport "127.0.0.1" "8080" defaultTCPParameters
@@ -494,6 +508,7 @@ main = do
494 , ("SendToTerminated", testSendToTerminated transport)
508 , ("SendToTerminated", testSendToTerminated transport)
495 , ("TypedChannnels", testTypedChannels transport)
509 , ("TypedChannnels", testTypedChannels transport)
496 , ("MergeChannels", testMergeChannels transport)
510 , ("MergeChannels", testMergeChannels transport)
511+ , ("TestTerminate", testTerminate transport)
497 -- The "missing" combinations in the list below don't make much sense, as
512 -- The "missing" combinations in the list below don't make much sense, as
498 -- we cannot guarantee that the monitor reply or link exception will not
513 -- we cannot guarantee that the monitor reply or link exception will not
499 -- happen before the unmonitor or unlink
514 -- happen before the unmonitor or unlink