clojure.test.check has the option to increase the maximum number of retries for generators. When creating complex schemas, you may face flakiness of generators and tests because of conditionals and other types of constraints. If the reader is interested in reading more about the context, the issue opened https://github.com/plumatic/schema-generators/issues/28 has more context.
Changes
To enable configuration of max-retries on such-that.
Changes:
Overload the function schema-generators.generators/generator to allow a new argument named opts to be provided as options (enabling further extension required).
Change the CompositeGenerator protocol to accept opts as argument
Implement tests for maximum number of retries and guarantee the existing tests are working
Context
clojure.test.check
has the option to increase the maximum number of retries for generators. When creating complex schemas, you may face flakiness of generators and tests because ofconditionals
and other types of constraints. If the reader is interested in reading more about the context, the issue opened https://github.com/plumatic/schema-generators/issues/28 has more context.Changes
To enable configuration of
max-retries
on such-that.Changes:
opts
to be provided as options (enabling further extension required).CompositeGenerator
protocol to acceptopts
as argument1.11.1