-
Notifications
You must be signed in to change notification settings - Fork 721
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set NumThreads to 1 in cardano-testnet-test #5758
Set NumThreads to 1 in cardano-testnet-test #5758
Conversation
40d5e3a
to
384878e
Compare
[ H.ignoreOnWindows "transaction" Cardano.Testnet.Test.SubmitApi.Babbage.Transaction.hprop_transaction | ||
] | ||
] | ||
] | ||
|
||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this just copied defaultMainWithIngredients
with ability to change OptionSet
or is there something else added here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that is correct.
@@ -105,4 +108,6 @@ main = do | |||
hSetEncoding stdout utf8 | |||
args <- E.getArgs | |||
|
|||
E.withArgs args $ tests >>= T.defaultMainWithIngredients ingredients | |||
let opts = T.singleOption $ T.NumThreads 1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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-tests
still work.This replaces #5744 because that PR fails in CI for an as yet unknown reason.
Checklist
See Runnings tests for more details
CHANGELOG.md
for affected package.cabal
files are updatedhlint
. See.github/workflows/check-hlint.yml
to get thehlint
versionstylish-haskell
. See.github/workflows/stylish-haskell.yml
to get thestylish-haskell
versionghc-8.10.7
andghc-9.2.7
Note 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.