-
Notifications
You must be signed in to change notification settings - Fork 470
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
Allow to run in strict mode. Fail if any exception is thrown while polling. #993
base: master
Are you sure you want to change the base?
Allow to run in strict mode. Fail if any exception is thrown while polling. #993
Conversation
Hi, spock has no logging library at the moment, this is not an accident. Furthermore, you already get the error as the cause of the SpockException so I don't see a great gain here. |
Hi, If you do not see a gain, feel free to reject it. Might be a good reason to do not add logging. |
Having a second thought. You might have noticed that the SpockException is only thrown when the time elapsed times out. Instead of logging, would you prefer to have a config parameter to be unexceptional and fail the eventually if exceptions different than the assertion are thrown? |
Hm, having something akin to spock/spock-core/src/main/java/spock/lang/Retry.java Lines 47 to 54 in d751a0a
PollingConditions would be ok.
Please be aware, that we won't merge anything until 2.0 branch is green. |
bd3a168
to
abdf79b
Compare
@leonard84 Let me know if you think that passing a parameter to run it on |
abdf79b
to
6d5e6cf
Compare
strict
mode. Fail if any exception is thrown while polling.
strict
mode. Fail if any exception is thrown while polling.…on invoking the closure. Co-authored-by: jordi9 <[email protected]>
6d5e6cf
to
33a6b0f
Compare
Using
PollingConditions
might hide some errors while invoking the closure.Adding a
log.error
might help to discover that an even that the test passed, an exception occurred.This change is