You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
foundry.toml should let you set max_shrink_time and max_shrink_iters options
Currently you can do this via env setting by init: PROPTEST_MAX_SHRINK_TIME and PROPTEST_MAX_SHRINK_ITE
Additional context
running
forge test -vvvv --junit
Sometimes gives you the error:
proptest: Aborting shrinking after the PROPTEST_MAX_SHRINK_ITERS environment variable or ProptestConfig.max_shrink_iters iterations (set 0 to a large(r) value to shrink more; current configuration: 0 iterations)proptest: Aborting shrinking after the PROPTEST_MAX_SHRINK_ITERS environment variable or ProptestConfig.max_shrink_iters iterations (set 0 to a large(r) value to shrink more; current configuration: 0 iterations)proptest: Aborting shrinking after the PROPTEST_MAX_SHRINK_ITERS environment variable or ProptestConfig.max_shrink_iters iterations (set 0 to a large(r) value to shrink more; current configuration: 0 iterations)proptest: Aborting shrinking after the PROPTEST_MAX_SHRINK_ITERS environment variable or ProptestConfig.max_shrink_iters iterations (set 0 to a large(r) value to shrink more; current configuration: 0 iterations)
The text was updated successfully, but these errors were encountered:
Hey @sambacha thanks for reporting. we're not using proptest to shrink failures because
fuzz tests (stateless) produce a single counterexample, so nothing to shrink
invariant tests fuzzed inputs are single proptest runs which we loop in to the configured depth, so again nothing to be shrinked with proptest but through our custom code (can be configured with timeout and shrink run limit.
Therefore we set proptest shrink iters to 0, basically disabling them, but proptest still gives warning. This should be fixed in proptest latest version with Verbosity of shrink disabled and persisted failure messages proptest-rs/proptest#459 so we need to update proptest to pick it up.
grandizzy
changed the title
feat(proptest): expose max_shrink_time and max_shrink_iters as config options
feat(proptest): update to suppress disabled shrink warnings
Feb 27, 2025
Hey @sambacha thanks for reporting. we're not using proptest to shrink failures because
fuzz tests (stateless) produce a single counterexample, so nothing to shrink
invariant tests fuzzed inputs are single proptest runs which we loop in to the configured depth, so again nothing to be shrinked with proptest but through our custom code (can be configured with timeout and shrink run limit.
Therefore we set proptest shrink iters to 0, basically disabling them, but proptest still gives warning. This should be fixed in proptest latest version with Verbosity of shrink disabled and persisted failure messages proptest-rs/proptest#459 so we need to update proptest to pick it up.
Going to track proptest update with this issue
makes sense, very weird this only shows up when using --junit flag, i checked and that seems to be the case.
Component
Forge
Describe the feature you would like
foundry.toml should let you set max_shrink_time and max_shrink_iters options
Currently you can do this via env setting by init:
PROPTEST_MAX_SHRINK_TIME
andPROPTEST_MAX_SHRINK_ITE
Additional context
running
forge test -vvvv --junit
Sometimes gives you the error:
The text was updated successfully, but these errors were encountered: