git.iko.soy/distributed-process
on master help sign in
d-p-tests: Set timeout when creating connections when testing with TCP.
c1e565bFacundo Domínguez
distributed-process-tests/distributed-process-tests.cabal+1−1
@@ -78,7 +78,7 @@ Test-Suite TestCHInTCP
78 distributed-process-tests,
78 distributed-process-tests,
79 network >= 2.3 && < 2.7,
79 network >= 2.3 && < 2.7,
80 network-transport >= 0.4.1.0 && < 0.5,
80 network-transport >= 0.4.1.0 && < 0.5,
81− network-transport-tcp >= 0.3 && < 0.6,
81+ network-transport-tcp >= 0.5 && < 0.6,
82 test-framework >= 0.6 && < 0.9
82 test-framework >= 0.6 && < 0.9
83 else
83 else
84 Buildable: False
84 Buildable: False
distributed-process-tests/tests/runTCP.hs+3−1
@@ -10,6 +10,7 @@ import Network.Transport.TCP
10 ( createTransportExposeInternals
10 ( createTransportExposeInternals
11 , TransportInternals(socketBetween)
11 , TransportInternals(socketBetween)
12 , defaultTCPParameters
12 , defaultTCPParameters
13+ , TCPParameters(..)
13 )
14 )
14import Test.Framework (defaultMainWithArgs)
15import Test.Framework (defaultMainWithArgs)
15
16
@@ -19,7 +20,8 @@ import System.Environment (getArgs)
19main :: IO ()
20main :: IO ()
20main = do
21main = do
21 Right (transport, internals) <-
22 Right (transport, internals) <-
22− createTransportExposeInternals "127.0.0.1" "8080" defaultTCPParameters
23+ createTransportExposeInternals "127.0.0.1" "8080"
24+ defaultTCPParameters { transportConnectTimeout = Just 3000000 }
23 ts <- tests TestTransport
25 ts <- tests TestTransport
24 { testTransport = transport
26 { testTransport = transport
25 , testBreakConnection = \addr1 addr2 -> do
27 , testBreakConnection = \addr1 addr2 -> do