Skip to content
This repository was archived by the owner on Sep 3, 2024. It is now read-only.

Commit 0494db1

Browse files
Stop running flaky tests. #91 #92
1 parent 3c7c665 commit 0494db1

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

network-transport-tcp.cabal

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Test-Suite TestTCP
5050
Main-Is: TestTCP.hs
5151
Build-Depends: base >= 4.3 && < 5,
5252
bytestring >= 0.9 && < 0.11,
53-
network-transport-tests >= 0.2.1.0 && < 0.3,
53+
network-transport-tests >= 0.3 && < 0.4,
5454
network >= 3.1 && < 3.2,
5555
network-transport,
5656
network-transport-tcp

tests/TestTCP.hs

+7-3
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ import Data.String (fromString)
9292
import GHC.IO.Exception (ioe_errno)
9393
import Foreign.C.Error (Errno(..), eADDRNOTAVAIL)
9494
import System.Timeout (timeout)
95-
import Network.Transport.Tests (testTransport)
95+
import Network.Transport.Tests (testTransportWithFilter)
9696
import Network.Transport.Tests.Auxiliary (forkTry, runTests)
9797
import Network.Transport.Tests.Traced
9898

@@ -1113,7 +1113,7 @@ main = do
11131113
, ("EarlyCloseSocket", testEarlyCloseSocket)
11141114
, ("IgnoreCloseSocket", testIgnoreCloseSocket)
11151115
, ("BlockAfterCloseSocket", testBlockAfterCloseSocket)
1116-
, ("UnnecessaryConnect", testUnnecessaryConnect 10)
1116+
-- , ("UnnecessaryConnect", testUnnecessaryConnect 10) -- flaky: #91
11171117
, ("InvalidAddress", testInvalidAddress)
11181118
, ("InvalidConnect", testInvalidConnect)
11191119
, ("Many", testMany)
@@ -1129,9 +1129,13 @@ main = do
11291129
, ("UnreachableConnect", testUnreachableConnect)
11301130
]
11311131
-- Run the generic tests even if the TCP specific tests failed..
1132-
testTransport (either (Left . show) (Right) <$>
1132+
testTransportWithFilter (`notElem` flakies) (either (Left . show) (Right) <$>
11331133
createTransport (defaultTCPAddr "127.0.0.1" "0") defaultTCPParameters)
11341134
-- ..but if the generic tests pass, still fail if the specific tests did not
11351135
case tcpResult of
11361136
Left err -> throwIO err
11371137
Right () -> return ()
1138+
where
1139+
flakies =
1140+
[ "ParallelConnects" -- #92
1141+
]

0 commit comments

Comments
 (0)