It's pretty easy to write a spec whose generator fails like this:
`Couldn't satisfy such-that predicate after 100 tries.
This is of course expected in many ways, but it's a very unhelpful error. Some things that could make this better include:
- Including the spec that failed in the exception. I only see one invocation of gen/such-that in spec.clj, and it appears to have the spec's form at hand. gen/such-that takes an exception constructor where this could be used.
- Allow max-tries to be changed from the hardcoded value of 100. When dealing with an intermittent failure, it can be useful to crank down max-tries to a very small number, making the failure easier to reproduce.