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
fix: Speed up the block round trip proptest #817
Conversation
Reduce the number of cases run by the block round trip proptest, to speed up the Zebra tests.
After this change, using this script: for d in zebra*; do
pushd "$d"
cargo --quiet test --no-run
time cargo --quiet test
popd
done The crates with test times over 1 second are: zebra-chain zebra-consensus zebrad |
@yaahc is 15-20 seconds fast enough for all the Zebra tests, or would you like me to tweak them some more? |
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.
15-20 seconds is plenty good I expect, lol.
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.
I'm ok with configuring the number of proptests run, I wonder if we can use the env vars it looks at to make it 'faster' where needed (local before push) and 'slower' where capacity allows (CI, where we can require even more test cases to pass if we want).
https://docs.rs/proptest/0.10.0/proptest/prelude/struct.ProptestConfig.html#structfield.cases
I don't want to globally override the number of cases by default, because only the block rests are slow right now. But I could use the cases env var where it exists, and then default to 16 block cases. That way, we can increase the number of cases in CI, or decrease them even further right before push. (Most of the time when I'm developing, each change takes me longer than 20 seconds to write.) |
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.
lgtm
See #828 for this change. |
Reduce the number of cases run by the block round trip proptest, to
speed up the Zebra tests.
Closes #803.