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 thread mode to @Timeout #2949
Conversation
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.
@gilbertojrequena Thanks a lot for the PR! I changed the implementation to reuse assertTimeoutPreemptively
so that they behave exactly the same. Any objections?
Hi @marcphilipp, Good idea! I have no objections. |
Overview
This PR is an attempt to solve the issue #2087, allowing to set the thread mode in the
@Timeout
annotation.Instead of calling the enum
Mode
, I called itThreadMode
since there was already a configuration parameter calledTIMEOUT_MODE_PROPERTY_NAME
which can lead to confusion.INFERRED
is used as default, in case no thread mode is provided by the configuration parameterSAME_THREAD
is used as default.I hereby agree to the terms of the JUnit Contributor License Agreement.
Definition of Done
@API
annotations