mirror of
https://gitee.com/zyjblog/oatpp.git
synced 2024-12-22 22:16:37 +08:00
Tests. Add retries for FullAsyncClientTest.
This commit is contained in:
parent
7cf2cf8871
commit
30e0f7ad1e
@ -114,10 +114,15 @@ public:
|
||||
}());
|
||||
|
||||
OATPP_CREATE_COMPONENT(std::shared_ptr<app::Client>, appClient)([] {
|
||||
|
||||
OATPP_COMPONENT(std::shared_ptr<oatpp::network::ClientConnectionProvider>, clientConnectionProvider);
|
||||
OATPP_COMPONENT(std::shared_ptr<oatpp::data::mapping::ObjectMapper>, objectMapper);
|
||||
auto requestExecutor = oatpp::web::client::HttpRequestExecutor::createShared(clientConnectionProvider);
|
||||
|
||||
auto retryPolicy = std::make_shared<oatpp::web::client::SimpleRetryPolicy>(5, std::chrono::seconds(1));
|
||||
|
||||
auto requestExecutor = oatpp::web::client::HttpRequestExecutor::createShared(clientConnectionProvider, retryPolicy);
|
||||
return app::Client::createShared(requestExecutor, objectMapper);
|
||||
|
||||
}());
|
||||
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user