Skip to content
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 constructor make timeout customisable #343

Merged
merged 1 commit into from
May 24, 2023

Conversation

aahlenst
Copy link
Contributor

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.

private long timeout;

/**
* Creates a new instance with the timeout set to {@link #DEFAULT_TIMEOUT}.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


/**
* Creates a new instance with a configurable timeout.
* @param timeout timeout in milliseconds
Copy link
Member

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;
Copy link
Member

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.

@artembilan artembilan added this to the 2.0.2 milestone May 23, 2023
@aahlenst
Copy link
Contributor Author

Problems should be resolved.

@artembilan artembilan merged commit 95464af into spring-projects:main May 24, 2023
@artembilan
Copy link
Member

Thank you for contribution; looking forward for more!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants