-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add ability to warn or fail a test if a seed is fixed #149
Conversation
introduce a `FixedSeedMode` that can be set globally (via properties) or on an individual test. this allows control of using the `seed` argument on a property, as it can be undesirable to accidentally commit a value in this field after reproducing a failure.
engine/src/main/java/net/jqwik/engine/execution/CheckedProperty.java
Outdated
Show resolved
Hide resolved
@osi Do you think it's ready for merging? |
I believe it's ready. The CI failure seems like a permission issue of some sort. |
Yes, CI is on me.
Von meinem iPad gesendet
… Am 22.01.2021 um 00:25 schrieb peter royal ***@***.***>:
I believe it's ready. The CI failure seems like a permission issue of some sort.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or unsubscribe.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you don't find the time I can do the few changes myself.
@@ -55,7 +55,17 @@ public CheckedProperty( | |||
} | |||
|
|||
public PropertyCheckResult check(Reporting[] reporting) { | |||
PropertyConfiguration effectiveConfiguration = configurationWithEffectiveSeed(); | |||
PropertyConfiguration effectiveConfiguration; | |||
try { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this try-catch block has a better place in method configurationWithEffectiveSeed()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem with moving into that method is that the try-catch block translates the exception to a PropertyCheckResult
.
I extracted the handling of the exception into a helper method, as the same work is done twice. perhaps that's sufficient for now?
engine/src/main/java/net/jqwik/engine/execution/CheckedProperty.java
Outdated
Show resolved
Hide resolved
I'll take care of them in the next few days. I appreciate the suggestions! |
Many thanks. Going to merge it. |
introduce a
FixedSeedMode
that can be set globally (via properties)or on an individual test. this allows control of using the
seed
argument on a property, as it can be undesirable to accidentally commit
a value in this field after reproducing a failure.
fix for #138