Skip to content
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

A no shrink setting. #91

Closed
Eh2406 opened this issue Aug 31, 2018 · 3 comments
Closed

A no shrink setting. #91

Eh2406 opened this issue Aug 31, 2018 · 3 comments

Comments

@Eh2406
Copy link

Eh2406 commented Aug 31, 2018

Some context: As you know, I am working on a complicated strategy with slow tests associated with it. This means that shrinking takes a long time (several hours), and that when we speed up shrinking we just make things more complicated to match. A better strategy may fix this situation (suggestions welcome), but that is the context I am coming from.

Currently if the tests pass it takes ~1 min to run, but if it fails then all we get on CI is a time out.

No output has been received in the last 10m0s, this potentially indicates a stalled build or something wrong with the build itself.

I wonder whether we could have an opt in setting for the proptest macro that would skip shrinking and just print the seed. The idea is that CI could run the test in this fail-fast mode, then if we want to shrink the example that CI found we could put the seed in the local regressions file.

@Centril
Copy link
Collaborator

Centril commented Aug 31, 2018

(There is a .no_shrink() method on Strategy that you can use for this locally.)

Eh2406 added a commit to Eh2406/cargo that referenced this issue Aug 31, 2018
@Eh2406
Copy link
Author

Eh2406 commented Sep 16, 2018

There is a work around, and the more I think about this the less it makes sense as having first class support. It would be nice to see what seed failed the CI run, but it is not going to be easy to figure out what to do with it, like which file to add it too.

@AltSysrq
Copy link
Collaborator

As of 0.8.7, there's now also max_shrink_time and max_shrink_iters options (PROPTEST_MAX_SHRINK_TIME / PROPTEST_MAX_SHRINK_ITERS env vars) to control this on a per-test basis or at run time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants