Closed AlexeyRaga closed 12 months ago
This should never happen.
Oh! I thought it would only happen if I implemented this feature incorrectly.
- Fix the code so that test would fail differently.
This optimized rechecking requires the same generators to be used in the same order. Both changes to the tests or changes to the production code could cause some alternative flow to happen.
I hadn't thought of this before. Instead of saying
This should never happen.
this should say something like
Using 'recheck' is not possible because the generators have changed. Use 'check' instead.
In addition to changing this text, we can add a test that exhibits this behavior.
Actually, if this happens, we can automatically run check
for the user. Is this better though? It could be confusing because recheck
is behaving like check
. But this should be ok because recheck
should never be used "forever". It should just be used temporarily as part of a debugging session.
I don't believe that it'd be fine because it may be confusing when it fails. In this case the failure will probably not be driven by that recheck string, and the user may not know about it.
I stumbled across this when experimentally using rechecks from one test on a different test with similar generators. Should the exception message be changed?
Yes, thanks for the reminder. I will update the error message and include it in the upcoming release.
I have got it in a "production" code test suit and was not able to reproduce it yet (didn't dig deep either).
Here is the exception:
It happened in this condition:
Re-running the test fails with this exception.