use of uk.gov.justice.services.test.utils.core.http.HttpResponsePoller in project microservice_framework by CJSCommonPlatform.
the class CakeShopIT method before.
@Before
public void before() throws Exception {
final PoolingHttpClientConnectionManager cm = new PoolingHttpClientConnectionManager();
final CloseableHttpClient httpClient = HttpClients.custom().setConnectionManager(cm).build();
// Increase max total connection to 200
cm.setMaxTotal(200);
// Increase default max connection per route to 20
cm.setDefaultMaxPerRoute(20);
final ApacheHttpClient4Engine engine = new ApacheHttpClient4Engine(httpClient);
client = new ResteasyClientBuilder().httpEngine(engine).build();
httpResponsePoller = new HttpResponsePoller();
}
Aggregations