Tests. Add retries for FullAsyncClientTest.

This commit is contained in:
lganzzzo 2019-12-25 19:09:03 +02:00
parent 7cf2cf8871
commit 30e0f7ad1e

View File

@ -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);
}());
};