git.iko.soy/distributed-process
on master help sign in
Clean up tests
commit006cad8e5df395e01883ff11bc1edc2422ef0d9b authorEdsko de Vries <edsko@edsko.net> dateFri 8 Jun 2012, 14:21 (14 years ago) parente6fc1c5
2 files changed+7−5
distributed-process/distributed-process.cabal+1 distributed-process/tests/TestCH.hs+6−5
distributed-process/distributed-process.cabal+1
@@ -35,6 +35,7 @@ Test-Suite TestCH
3535 transformers,
3636 data-accessor,
3737 random,
38+ ansi-terminal,
3839 network-transport >= 0.1
3940 Extensions: ExplicitForAll, ScopedTypeVariables, GeneralizedNewtypeDeriving, FlexibleInstances, UndecidableInstances, MultiParamTypeClasses, DeriveDataTypeable
4041 ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N -fno-warn-unused-do-bind
distributed-process/tests/TestCH.hs+6−5
@@ -9,11 +9,11 @@ import Control.Concurrent.MVar ( newEmptyMVar
99 , takeMVar
1010 , readMVar
1111 )
12−import Control.Exception (catch)
1312import Control.Monad (replicateM_)
1413import Control.Distributed.Process
1514import qualified Network.Transport as NT (Transport)
1615import Network.Transport.TCP (createTransport, defaultTCPParameters)
16+import TestAuxiliary
1717
1818newtype Ping = Ping ProcessId
1919 deriving (Typeable, Binary, Show)
@@ -55,7 +55,6 @@ testPing transport = do
5555 Ping _ <- expect
5656 return ()
5757
58− putStrLn $ "Client did " ++ show numPings ++ " pings"
5958 putMVar clientDone ()
6059
6160
@@ -113,6 +112,8 @@ testMonitor2 transport = do
113112main :: IO ()
114113main = do
115114 Right transport <- createTransport "127.0.0.1" "8080" defaultTCPParameters
116− -- testPing transport
117− testMonitor1 transport
118− testMonitor2 transport
115+ runTests
116+ [ ("Ping", testPing transport)
117+ , ("Monitor1", testMonitor1 transport)
118+ , ("Monitor2", testMonitor2 transport)
119+ ]