-
Notifications
You must be signed in to change notification settings - Fork 483
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
[Test] Make tests take reasonable time #6286
Changes from all commits
6926995
cb656ef
0eb3794
6b0f794
d0d2511
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,4 +9,4 @@ import Test.QuickCheck | |
|
||
-- | This mainly tests that the `Data` generator isn't non-terminating or too slow. | ||
prop_genData :: Property | ||
prop_genData = withMaxSuccess 3000 $ \(d :: Data) -> d === deserialise (serialise d) | ||
prop_genData = withMaxSuccess 800 $ \(d :: Data) -> d === deserialise (serialise d) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Currently we do not upscale any
on my machine. On a different machine the tests would obviously take a different amount of time, but they'll perhaps be still fast and consistent enough. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -34,7 +34,7 @@ instance Arbitrary (BuiltinSemanticsVariant PLC.DefaultFun) where | |
-- exploration of the program space. If you also take other arguments, then consider multiplying | ||
-- this up in order to account for the larger space. | ||
numTestsForPassProp :: Int | ||
numTestsForPassProp = 3000 | ||
numTestsForPassProp = 99 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Let's ban ever running 100 tests. We don't need a default to decide for us how many tests to run, so let's ensure that we always make the choice ourselves. Seeing 100 in the test output should mean "oops, we forgot to explicitly specify the number of tests". |
||
|
||
-- | Run a 'Pass' on a 'Term', setting up the typechecking config and throwing errors. | ||
runTestPass | ||
|
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.
This is an example of the changes in this PR.
mapTestLimitAtLeast n (`div` m)
runs no fewer thann
tests (i.e. you'll getn
tests if you just run the test suite locally) and(`div` m)
says that the amount of tests runs in the nightly test suite need to be downscaled bym
times (if would perhaps be better to upscale instead of downscaling but I just wanted to get something working and we already run the nightly test suite with50000
hedgehog
tests, so I took that as a given).