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

Commit

Permalink
Stop running flaky tests. #91 #92
Browse files Browse the repository at this point in the history
  • Loading branch information
facundominguez committed Oct 8, 2020
1 parent 3c7c665 commit 061809b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion network-transport-tcp.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ Test-Suite TestTCP
Main-Is: TestTCP.hs
Build-Depends: base >= 4.3 && < 5,
bytestring >= 0.9 && < 0.11,
network-transport-tests >= 0.2.1.0 && < 0.3,
network-transport-tests >= 0.3 && < 0.4,
network >= 3.1 && < 3.2,
network-transport,
network-transport-tcp
Expand Down
9 changes: 7 additions & 2 deletions tests/TestTCP.hs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ import Data.String (fromString)
import GHC.IO.Exception (ioe_errno)
import Foreign.C.Error (Errno(..), eADDRNOTAVAIL)
import System.Timeout (timeout)
import Network.Transport.Tests (testTransport)
import Network.Transport.Tests (testTransportWithFilter)
import Network.Transport.Tests.Auxiliary (forkTry, runTests)
import Network.Transport.Tests.Traced

Expand Down Expand Up @@ -1129,9 +1129,14 @@ main = do
, ("UnreachableConnect", testUnreachableConnect)
]
-- Run the generic tests even if the TCP specific tests failed..
testTransport (either (Left . show) (Right) <$>
testTransportWithFilter (`notElem` flakies) (either (Left . show) (Right) <$>
createTransport (defaultTCPAddr "127.0.0.1" "0") defaultTCPParameters)
-- ..but if the generic tests pass, still fail if the specific tests did not
case tcpResult of
Left err -> throwIO err
Right () -> return ()
where
flakies =
[ "ParallelConnects" -- #92
, "UnnecessaryConnect" -- #91
]

0 comments on commit 061809b

Please sign in to comment.