Set NumThreads to 1 in cardano-testnet-test - #5758
Conversation
40d5e3a to
384878e
Compare
|
|
||
| shouldRunInParallel :: IO Bool | ||
| shouldRunInParallel = (== Just "1") <$> E.lookupEnv "PARALLEL_TESTNETS" | ||
| defaultMainWithIngredientsAndOptions :: [T.Ingredient] -> T.OptionSet -> T.TestTree -> IO () |
There was a problem hiding this comment.
Is this just copied defaultMainWithIngredients with ability to change OptionSet or is there something else added here?
There was a problem hiding this comment.
Yes, that is correct.
| args <- E.getArgs | ||
|
|
||
| E.withArgs args $ tests >>= T.defaultMainWithIngredients ingredients | ||
| let opts = T.singleOption $ T.NumThreads 1 |
There was a problem hiding this comment.
Can we have an environment variable to override this? It's still useful to me to be able to run tests in parallel locally.
There was a problem hiding this comment.
You should be able to do this:
--test-options '--num-threads 8'
Because all I've done is change the default.
There was a problem hiding this comment.
The default is:
defaultValue = NumThreads numCapabilities
Whatever that works out to be.
|
Also see: UnkindPartition/tasty#414 and UnkindPartition/tasty#412 |
|
@newhoggy I'm wondering if the PR can't pass the merge queue because of your changes or if it's because our cardano-testnet flakiness |
384878e to
73a3cbc
Compare
Description
Make tests single-threaded by setting
NumThreads 1. This has the advantage that--list-testsstill work.This replaces #5744 because that PR fails in CI for an as yet unknown reason.
Checklist
See Runnings tests for more details
CHANGELOG.mdfor affected package.cabalfiles are updatedhlint. See.github/workflows/check-hlint.ymlto get thehlintversionstylish-haskell. See.github/workflows/stylish-haskell.ymlto get thestylish-haskellversionghc-8.10.7andghc-9.2.7Note on CI
If your PR is from a fork, the necessary CI jobs won't trigger automatically for security reasons.
You will need to get someone with write privileges. Please contact IOG node developers to do this
for you.