@@ -295,6 +295,13 @@ testMath transport = do
296 takeMVar clientDone
296 takeMVar clientDone
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 ())]
298-- TODO: test timeout
305-- TODO: test timeout
300main :: IO ()
307main :: IO ()
@@ -303,6 +310,7 @@ main = do
303 runTests
310 runTests
304 [ ("Ping", testPing transport)
311 [ ("Ping", testPing transport)
305 , ("Math", testMath transport)
312 , ("Math", testMath transport)
313+ , ("Timeout", testTimeout transport)
306 -- The "missing" combinations in the list below don't make much sense, as
314 -- The "missing" combinations in the list below don't make much sense, as
307 -- we cannot guarantee that the monitor reply or link exception will not
315 -- we cannot guarantee that the monitor reply or link exception will not
308 -- happen before the unmonitor or unlink
316 -- happen before the unmonitor or unlink