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
I've spent a few hours minimizing this from what I have in a work context. It looks like catching a panic inside rapid.Check interferes with test minimization.
Rapid internally uses panics to signal various special conditions that arise during execution. These panics are not supposed to be caught by the user code.
It is probably best to avoid using things like require.NotPanics() in rapid tests. Rapid by default ensures that all tests do not panic; helpers that recover from panics do not add anything useful on top (but can add some problems).
Thanks, that makes sense. I did read the code involving the invalidData type being used while panicking, as well as the pattern-matching on it, but I didn't quite connect the dots.
Thoughts on adding a short doc comment on rapid.Check or in the README to indicate that users should not catch panics (if they're meant to indicate test failure)?
Reproducer repo: https://github.com/varungandhi-src/rapidbug
I've spent a few hours minimizing this from what I have in a work context. It looks like catching a panic inside
rapid.Check
interferes with test minimization.varungandhi-src/rapidbug@6d30172
^ As indicated in the linked commit, avoiding
require.NotPanics()
(at least in the above case) fixes the issue.Can you clarify if this is expected behavior/a known limitation, or if this is a bug?
The text was updated successfully, but these errors were encountered: