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
Current behavior:
Gen instances for a string are automatically set to Gen.anyString
Problem:
Gen.anyString can produce a character that postgres doesn't like, \u0000, which causes tests against a postgres db to randomly fail and do so extremely rarely making it harder to debug the cause. The use of refined types would also be a use case for this, for instance something with a fairly specific string refinement is better served by starting with a string that closely matches the refinement rather than hoping you eventually get the right kind of string from Gen.anyString.
Solution:
Some way to implicitly override the string gen for anything else, or a way to bake in the generator I want into a schema that can be used in place of the string primitive schema. An annotation might be a good solution.
The text was updated successfully, but these errors were encountered:
Current behavior:
Gen instances for a string are automatically set to Gen.anyString
Problem:
Gen.anyString can produce a character that postgres doesn't like,
\u0000
, which causes tests against a postgres db to randomly fail and do so extremely rarely making it harder to debug the cause. The use of refined types would also be a use case for this, for instance something with a fairly specific string refinement is better served by starting with a string that closely matches the refinement rather than hoping you eventually get the right kind of string from Gen.anyString.Solution:
Some way to implicitly override the string gen for anything else, or a way to bake in the generator I want into a schema that can be used in place of the string primitive schema. An annotation might be a good solution.
The text was updated successfully, but these errors were encountered: