File tree Expand file tree Collapse file tree 1 file changed +3
-12
lines changed
distributed-process-tests/src/Control/Distributed/Process/Tests Expand file tree Collapse file tree 1 file changed +3
-12
lines changed Original file line number Diff line number Diff line change @@ -560,19 +560,10 @@ testMergeChannels TestTransport{..} = do
560
560
testTerminate :: TestTransport -> Assertion
561
561
testTerminate TestTransport {.. } = do
562
562
localNode <- newLocalNode testTransport initRemoteTable
563
- done <- newEmptyMVar
564
-
565
- pid <- forkProcess localNode $ do
566
- liftIO $ threadDelay 100000
567
- terminate
568
-
569
563
runProcess localNode $ do
570
- ref <- monitor pid
571
- ProcessMonitorNotification ref' pid' (DiedException ex) <- expect
572
- True <- return $ ref == ref' && pid == pid' && ex == show ProcessTerminationException
573
- liftIO $ putMVar done ()
574
-
575
- takeMVar done
564
+ e <- try terminate :: Process (Either ProcessTerminationException () )
565
+ True <- return $ either show show e == show ProcessTerminationException
566
+ return ()
576
567
577
568
testMonitorNode :: TestTransport -> Assertion
578
569
testMonitorNode TestTransport {.. } = do
You can’t perform that action at this time.
0 commit comments