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

Shrinker runs once when shrink_time is zero. #248

Open
mkforsb opened this issue Sep 29, 2024 · 1 comment
Open

Shrinker runs once when shrink_time is zero. #248

mkforsb opened this issue Sep 29, 2024 · 1 comment

Comments

@mkforsb
Copy link
Contributor

mkforsb commented Sep 29, 2024

I tried setting .with_shrink_time(ZERO) to fully disable input shrinking for a proptest, but noticed that the shrinker only checks if the shrinking time is exhausted after running its first iteration: shrink.rs#L100-L103. In my case this causes a rather large delay whenever there is a test failure, which is annoying during test development.

Is there some other feature besides adjusting the shrinking time for fully disabling shrinking?

If not, do you think this approach could be viable for a PR?

@camshaft
Copy link
Owner

Yeah setting it to zero should disable shrinking so if it doesn't then it's a bug. I think what you have looks like a reasonable fix.

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

2 participants