git.iko.soy/distributed-process
on 7930062 help sign in
30 lines 1.1 kB history raw
1-- Run tests using the TCP transport.
3module Main where
5import TEST_SUITE_MODULE (tests)
7import Network.Transport.Test (TestTransport(..))
8import Network.Transport.InMemory
9import Test.Framework (defaultMainWithArgs)
11import System.Environment (getArgs)
13main :: IO ()
14main = do
15 (transport, internals) <- createTransportExposeInternals
16 ts <- tests TestTransport
17 { testTransport = transport
18 , testBreakConnection = \addr1 addr2 -> breakConnection internals addr1 addr2 "user error"
19 }
20 args <- getArgs
21 -- Tests are time sensitive. Running the tests concurrently can slow them
22 -- down enough that threads using threadDelay would wake up later than
23 -- expected, thus changing the order in which messages were expected.
24 -- Therefore we run the tests sequentially by passing "-j 1" to
25 -- test-framework. This does not solve the issue but makes it less likely.
26 --
27 -- The problem was first detected with
28 -- 'Control.Distributed.Process.Tests.CH.testMergeChannels'
29 -- in particular.
30 defaultMainWithArgs ts ("-j" : "1" : args)