-
Notifications
You must be signed in to change notification settings - Fork 519
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
ExponentialBackOffContext
not considering the interval set by application.properties
#420
Comments
The logic there in the
So, that
So, we call supplier only once and set its value into the So, everything around I would be happy to see some unit test to prove opposite, but before that let's see you really use the latest Spring Retry |
Thanks for the quick reply. So I noticed this issue around 2 weeks ago and tried the latest version I prepared the unit tests anyway just to be sure that I didn't miss something. Up to Here the output of the test And Nonetheless the problem is gone in |
Yep! See release notes: https://github.com/spring-projects/spring-retry/releases/tag/v2.0.5. The issue which has been fixed on the matter is this: #397. So, closing this as |
Hello there,
I'm reporting a bug that I found in the class ExponentialBackOffPolicy when trying to configure it with the
application.properties
.Basically the interval set by the
delayExpression
in the annotation@Retryable
is not used when calling the methodgetNextInterval
, but rather the one set bydelay
. Consequentially that leads to wrong exponential retries. We can see in the screenshot below that the class fieldthis.interval
is being used instead of thegetInterval
method which evaluates thedelayExpression
.To reproduce the issue:
application.properties
:@Retryable
:When running the code the retry is attempted every 1 minute what should not be the case.
An initial fix would be to call the
getInterval
, however as I don't have a complete overview of the library, it might be needed further changes.Thank you and if you have more questions, just let me know.
Cheers!
The text was updated successfully, but these errors were encountered: