-
Notifications
You must be signed in to change notification settings - Fork 3k
[type:bugfix]Add more retry strategies #5969
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
| String CONTENT_ENCODING = "Content-Encoding"; | ||
|
|
||
| /** | ||
| * http请求重试策略 http request retry policy. |
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.
use English, pls
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.
ok,i fix it
| public enum HttpRetryBackoffSpecEnum { | ||
|
|
||
| /** | ||
| * 默认重试. |
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.
use English, pls
| DEFAULT_BACKOFF("default"), | ||
|
|
||
| /** | ||
| * 固定重试. |
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.
use English, pls
| FIXED_BACKOFF("fixed"), | ||
|
|
||
| /** | ||
| * 指数重试. |
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.
use English, pls
| EXPONENTIAL_BACKOFF("exponential"), | ||
|
|
||
| /** | ||
| * 自定义重试. |
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.
use English, pls
|
|
||
|
|
||
| /** | ||
| * 默认重试策略类 Default Retry Policy Class |
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.
use English, pls
| } | ||
|
|
||
| /** | ||
| * 执行重试策略 |
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.
use English, pls
| } | ||
|
|
||
| /** | ||
| * 执行重试策略 |
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.
use English, pls
| import java.time.Duration; | ||
|
|
||
| /** | ||
| * 重试策略接口 Retry Policy Interface |
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.
use English, pls
|
|
||
| @Test | ||
| void testDefaultRetryBackoffExecute() { | ||
| // 创建一个模拟的 AbstractHttpClientPlugin |
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.
use English, pls
|
fix ci error pls |
|
fix the ci |
好的,多谢,版本已经提交 |
Aias00
left a comment
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.
LGTM
修复了#5920,保持原有代码不变的基础上,重构了AbstractHttpClientPlugin.让它支持更多的重试策略
Fixes #5920 ,On the basis of keeping the original code unchanged, we refactored AbstractFHIR Plugin Enable it to support more retry strategies
Make sure that:
./mvnw clean install -Dmaven.javadoc.skip=true.