Skip to content

Commit

Permalink
Bump Cabal version for tests; change port in TCP test to 0
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsd committed Mar 31, 2024
1 parent fa3b7a8 commit cab53c6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
10 changes: 9 additions & 1 deletion distributed-process-tests/distributed-process-tests.cabal
Expand Up @@ -10,7 +10,7 @@ Maintainer: Tim Watson <watson.timothy@gmail.com>
copyright: Well-Typed LLP
category: Control, Cloud Haskell
build-type: Simple
cabal-version: >=1.8
cabal-version: >=1.10

flag tcp
Description: build and run TCP tests
Expand Down Expand Up @@ -42,6 +42,7 @@ library
test-framework-hunit >= 0.2.0 && < 0.4,
stm
hs-source-dirs: src
default-language: Haskell98
ghc-options: -Wall -fno-warn-unused-do-bind
extensions: CPP,
ExistentialQuantification,
Expand All @@ -66,6 +67,7 @@ Test-Suite TestCHInMemory
network-transport-inmemory >= 0.5,
test-framework >= 0.6 && < 0.9
Extensions: CPP
default-language: Haskell98
ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N -fno-warn-unused-do-bind
HS-Source-Dirs: tests

Expand All @@ -83,6 +85,7 @@ Test-Suite TestCHInTCP
else
Buildable: False
Extensions: CPP
default-language: Haskell98
ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N -fno-warn-unused-do-bind
HS-Source-Dirs: tests

Expand All @@ -98,6 +101,7 @@ Test-Suite TestClosure
network-transport-inmemory >= 0.5,
test-framework >= 0.6 && < 0.9
Extensions: CPP
default-language: Haskell98
ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N -fno-warn-unused-do-bind
HS-Source-Dirs: tests

Expand All @@ -112,6 +116,7 @@ Test-Suite TestStats
network-transport-inmemory >= 0.5,
test-framework >= 0.6 && < 0.9
Extensions: CPP
default-language: Haskell98
ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N -fno-warn-unused-do-bind
HS-Source-Dirs: tests

Expand All @@ -126,6 +131,7 @@ Test-Suite TestMxInMemory
network-transport-inmemory >= 0.5,
test-framework >= 0.6 && < 0.9
Extensions: CPP
default-language: Haskell98
ghc-options: -threaded -rtsopts -with-rtsopts=-N -fno-warn-unused-do-bind
HS-Source-Dirs: tests

Expand All @@ -140,6 +146,7 @@ Test-Suite TestTracingInMemory
network-transport-inmemory >= 0.5,
test-framework >= 0.6 && < 0.9
Extensions: CPP
default-language: Haskell98
ghc-options: -threaded -rtsopts -with-rtsopts=-N -fno-warn-unused-do-bind
HS-Source-Dirs: tests

Expand All @@ -154,5 +161,6 @@ Test-Suite TestMxInTCP
network-transport-inmemory >= 0.5,
test-framework >= 0.6 && < 0.9
Extensions: CPP
default-language: Haskell98
ghc-options: -Wall -threaded -rtsopts -with-rtsopts=-N -fno-warn-unused-do-bind
HS-Source-Dirs: tests
Expand Up @@ -188,8 +188,8 @@ newLogger = do
_ <- forkIO $ logger q
return $ Logger tid q
where logger q' = forever $ do
msg <- atomically $ readTQueue q'
putStrLn msg
msg <- atomically $ readTQueue q'
putStrLn msg

-- | Send a message to the Logger
putLogMsg :: Logger -> String -> Process ()
Expand Down
2 changes: 1 addition & 1 deletion distributed-process-tests/tests/runTCP.hs
Expand Up @@ -25,7 +25,7 @@ main = do
hSetBuffering stdout LineBuffering
hSetBuffering stderr LineBuffering
Right (transport, internals) <-
createTransportExposeInternals (defaultTCPAddr "127.0.0.1" "8080")
createTransportExposeInternals (defaultTCPAddr "127.0.0.1" "0")
defaultTCPParameters { transportConnectTimeout = Just 3000000 }
ts <- tests TestTransport
{ testTransport = transport
Expand Down

0 comments on commit cab53c6

Please sign in to comment.