Skip to content

Commit e8dbed8

Browse files
committed
Enable parallel testnet tests execution by default
1 parent 3cbbace commit e8dbed8

File tree

1 file changed

+10
-23
lines changed

1 file changed

+10
-23
lines changed

cardano-testnet/test/cardano-testnet-test/cardano-testnet-test.hs

Lines changed: 10 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -33,37 +33,36 @@ import qualified Test.Tasty.Ingredients as T
3333

3434
tests :: IO TestTree
3535
tests = do
36-
testGroup <- runTestGroup <$> shouldRunInParallel
37-
pure $ testGroup "test/Spec.hs"
38-
[ testGroup "Spec"
39-
[ testGroup "Ledger Events"
36+
pure $ T.testGroup "test/Spec.hs"
37+
[ T.testGroup "Spec"
38+
[ T.testGroup "Ledger Events"
4039
[ H.ignoreOnWindows "Sanity Check" LedgerEvents.hprop_ledger_events_sanity_check
4140
, H.ignoreOnWindows "Treasury Growth" LedgerEvents.prop_check_if_treasury_is_growing
4241
-- TODO: Replace foldBlocks with checkLedgerStateCondition
43-
, testGroup "Governance"
42+
, T.testGroup "Governance"
4443
[ H.ignoreOnMacAndWindows "ProposeAndRatifyNewConstitution" Cardano.Testnet.Test.LedgerEvents.Gov.ProposeNewConstitution.hprop_ledger_events_propose_new_constitution
4544
-- FIXME Those tests are flaky
4645
-- , H.ignoreOnWindows "InfoAction" LedgerEvents.hprop_ledger_events_info_action
4746
, H.ignoreOnWindows "ProposeNewConstitutionSPO" LedgerEvents.hprop_ledger_events_propose_new_constitution_spo
4847
, H.ignoreOnWindows "DRepRetirement" DRepRetirement.hprop_drep_retirement
4948
]
50-
, testGroup "Plutus"
49+
, T.testGroup "Plutus"
5150
[ H.ignoreOnWindows "PlutusV3" Cardano.Testnet.Test.Cli.Conway.Plutus.hprop_plutus_v3]
5251
]
53-
, testGroup "CLI"
52+
, T.testGroup "CLI"
5453
[ H.ignoreOnWindows "Shutdown" Cardano.Testnet.Test.Node.Shutdown.hprop_shutdown
5554
-- ShutdownOnSigint fails on Mac with
5655
-- "Log file: /private/tmp/tmp.JqcjW7sLKS/kes-period-info-2-test-30c2d0d8eb042a37/logs/test-spo.stdout.log had no logs indicating the relevant node has minted blocks."
5756
, H.ignoreOnMacAndWindows "ShutdownOnSigint" Cardano.Testnet.Test.Node.Shutdown.hprop_shutdownOnSigint
5857
-- ShutdownOnSlotSynced FAILS Still. The node times out and it seems the "shutdown-on-slot-synced" flag does nothing
5958
-- , H.ignoreOnWindows "ShutdownOnSlotSynced" Cardano.Testnet.Test.Node.Shutdown.hprop_shutdownOnSlotSynced
60-
, testGroup "Babbage"
59+
, T.testGroup "Babbage"
6160
[ H.ignoreOnMacAndWindows "leadership-schedule" Cardano.Testnet.Test.Cli.Babbage.LeadershipSchedule.hprop_leadershipSchedule -- FAILS
6261
, H.ignoreOnWindows "stake-snapshot" Cardano.Testnet.Test.Cli.Babbage.StakeSnapshot.hprop_stakeSnapshot
6362
, H.ignoreOnWindows "transaction" Cardano.Testnet.Test.Cli.Babbage.Transaction.hprop_transaction
6463
]
6564
-- TODO: Conway - Re-enable when create-staked is working in conway again
66-
--, testGroup "Conway"
65+
--, T.testGroup "Conway"
6766
-- [ H.ignoreOnWindows "stake-snapshot" Cardano.Testnet.Test.Cli.Conway.StakeSnapshot.hprop_stakeSnapshot
6867
-- ]
6968
-- Ignored on Windows due to <stdout>: commitBuffer: invalid argument (invalid character)
@@ -74,25 +73,13 @@ tests = do
7473
]
7574

7675
]
77-
, testGroup "SubmitApi"
78-
[ testGroup "Babbage"
76+
, T.testGroup "SubmitApi"
77+
[ T.testGroup "Babbage"
7978
[ H.ignoreOnWindows "transaction" Cardano.Testnet.Test.SubmitApi.Babbage.Transaction.hprop_transaction
8079
]
8180
]
8281
]
8382

84-
shouldRunInParallel :: IO Bool
85-
shouldRunInParallel = (== Just "1") <$> E.lookupEnv "PARALLEL_TESTNETS"
86-
87-
-- FIXME Right now when running tests concurrently it makes them flaky
88-
runTestGroup
89-
:: Bool -- ^ True to run in parallel
90-
-> T.TestName
91-
-> [TestTree]
92-
-> TestTree
93-
runTestGroup True name = T.testGroup name
94-
runTestGroup False name = T.sequentialTestGroup name T.AllFinish
95-
9683
ingredients :: [T.Ingredient]
9784
ingredients = T.defaultIngredients
9885

0 commit comments

Comments
 (0)