File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import qualified Test.Cardano.Db.Mock.Unit.Babbage as Babbage
1212import qualified Test.Cardano.Db.Mock.Unit.Conway as Conway
1313import Test.Tasty
1414import Test.Tasty.QuickCheck (testProperty )
15+ import Test.Tasty.Runners (NumThreads (.. ))
1516import Prelude
1617
1718main :: IO ()
@@ -27,14 +28,17 @@ main = do
2728
2829tests :: IOManager -> IO TestTree
2930tests iom = do
31+ -- Tests share a single Postgres instance and DB, so they must run serially.
32+ -- tasty 1.5+ defaults to parallel execution; override that here.
3033 pure $
31- testGroup
32- " cardano-chain-gen"
33- [ Conway. unitTests iom knownMigrationsPlain
34- , Babbage. unitTests iom knownMigrationsPlain
35- , Alonzo. unitTests iom knownMigrationsPlain
36- , testProperty " QSM" $ Property. prop_empty_blocks iom knownMigrationsPlain
37- ]
34+ localOption (NumThreads 1 ) $
35+ testGroup
36+ " cardano-chain-gen"
37+ [ Conway. unitTests iom knownMigrationsPlain
38+ , Babbage. unitTests iom knownMigrationsPlain
39+ , Alonzo. unitTests iom knownMigrationsPlain
40+ , testProperty " QSM" $ Property. prop_empty_blocks iom knownMigrationsPlain
41+ ]
3842 where
3943 knownMigrationsPlain :: [(Text , Text )]
4044 knownMigrationsPlain = (\ x -> (hash x, filepath x)) <$> knownMigrations
You can’t perform that action at this time.
0 commit comments