1-- Run tests using the TCP transport.
5import TEST_SUITE_MODULE (tests)
7import Network.Transport.Test (TestTransport(..))
8import Network.Socket (sClose)
9import Network.Transport.TCP
10 ( createTransportExposeInternals
11 , TransportInternals(socketBetween)
12 , defaultTCPParameters
15import Test.Framework (defaultMainWithArgs)
17import Control.Concurrent (threadDelay)
18import System.Environment (getArgs)
23 hSetBuffering stdout LineBuffering
24 hSetBuffering stderr LineBuffering
25 Right (transport, internals) <-
26 createTransportExposeInternals "127.0.0.1" "8080"
27 defaultTCPParameters { transportConnectTimeout = Just 3000000 }
28 ts <- tests TestTransport
29 { testTransport = transport
30 , testBreakConnection = \addr1 addr2 -> do
31 sock <- socketBetween internals addr1 addr2
36 -- Tests are time sensitive. Running the tests concurrently can slow them
37 -- down enough that threads using threadDelay would wake up later than
38 -- expected, thus changing the order in which messages were expected.
39 -- Therefore we run the tests sequentially by passing "-j 1" to
40 -- test-framework. This does not solve the issue but makes it less likely.
42 -- The problem was first detected with
43 -- 'Control.Distributed.Process.Tests.CH.testMergeChannels'
45 defaultMainWithArgs ts ("-j" : "1" : args)
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list