-
Notifications
You must be signed in to change notification settings - Fork 525
Add constructor make timeout customisable #343
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
Conversation
5aff957
to
40e9693
Compare
private long timeout; | ||
|
||
/** | ||
* Creates a new instance with the timeout set to {@link #DEFAULT_TIMEOUT}. |
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.
Method Javadocs must be imperative: https://github.com/spring-projects/spring-framework/wiki/Code-Style#javadoc-formatting
|
||
/** | ||
* Creates a new instance with a configurable timeout. | ||
* @param timeout timeout in milliseconds |
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.
@since 2.0.2
@@ -21,6 +21,7 @@ | |||
import org.springframework.retry.RetryContext; | |||
|
|||
import static org.assertj.core.api.Assertions.assertThat; | |||
import static org.assertj.core.api.Assertions.assertThatThrownBy; |
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.
This import is out of use.
Please, remove.
40e9693
to
ea272f1
Compare
Problems should be resolved. |
Thank you for contribution; looking forward for more! |
Adds a separate constructor to
TimeoutRetryPolicy
to create a new instance with a configurable timeout. This follows the pattern established by other policies, for example,SimpleRetryPolicy
, that allow to customise their behaviour during instance creation.