git.iko.soy/distributed-process
on master help sign in
Add a test for 'timeout'
commit0e3fa94f5c2aa01963e10e638c7c87f76c6892e7 authorEdsko de Vries <edsko@edsko.net> dateWed 20 Jun 2012, 10:22 (14 years ago) parentdf986fd
1 file changed+8
distributed-process/tests/TestCH.hs+8
distributed-process/tests/TestCH.hs+8
@@ -295,6 +295,13 @@ testMath transport = do
295295
296296 takeMVar clientDone
297297
298+testTimeout :: NT.Transport -> IO ()
299+testTimeout transport = do
300+ localNode <- newLocalNode transport initRemoteTable
301+ runProcess localNode $ do
302+ Nothing <- receiveTimeout 1000000 [match (\(Add _ _ _) -> return ())]
303+ return ()
304+
298305-- TODO: test timeout
299306
300307main :: IO ()
@@ -303,6 +310,7 @@ main = do
303310 runTests
304311 [ ("Ping", testPing transport)
305312 , ("Math", testMath transport)
313+ , ("Timeout", testTimeout transport)
306314 -- The "missing" combinations in the list below don't make much sense, as
307315 -- we cannot guarantee that the monitor reply or link exception will not
308316 -- happen before the unmonitor or unlink