@@ -24,6 +24,7 @@ import Prelude hiding (drop, (*>))
2424
2525
2626import Test.Tasty (TestTree , testGroup , defaultMain )
27+ import Test.Tasty.Flaky (flakyTest , limitRetries )
2728import Test.Tasty.HUnit (testCase , assertEqual , assertBool )
2829
2930import Network.Transport.TCP
@@ -257,6 +258,11 @@ myRemoteTable :: RemoteTable
257258myRemoteTable =
258259 Control.Distributed.Process.Extras. __remoteTable $ initRemoteTable
259260
261+ -- Some tests are flaky due to the CI environment being noticeable
262+ -- slower (and therefore exposing some race conditions)
263+ flaky :: TestTree -> TestTree
264+ flaky = flakyTest (limitRetries 3 )
265+
260266tests :: NT. Transport -> IO TestTree
261267tests transport = do
262268 {- verboseCheckWithResult stdArgs -}
@@ -269,8 +275,9 @@ tests transport = do
269275 (runProcess localNode notSoQuirkyDefinitions)
270276 , testCase " Traversing an FSM definition (exit handling)"
271277 (runProcess localNode verifyStopBehaviour)
272- , testCase " Traversing an FSM definition (mailbox handling)"
273- (runProcess localNode verifyMailboxHandling)
278+ , flaky
279+ $ testCase " Traversing an FSM definition (mailbox handling)"
280+ (runProcess localNode verifyMailboxHandling)
274281 , testCase " Traversing an FSM definition (nested definitions)"
275282 (runProcess localNode verifyOuterStateHandler)
276283 , testCase " Traversing an FSM definition (event re-publication)"
0 commit comments