Remove support for deprecated AbstractHttpClient class
Issue: SPR-14422
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -49,20 +49,6 @@ public class HttpComponentsClientHttpRequestFactoryTests extends AbstractHttpReq
|
||||
assertHttpMethod("patch", HttpMethod.PATCH);
|
||||
}
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Test
|
||||
public void assertLegacyCustomConfig() {
|
||||
HttpClient httpClient = new org.apache.http.impl.client.DefaultHttpClient(); // Does not support RequestConfig
|
||||
HttpComponentsClientHttpRequestFactory hrf = new HttpComponentsClientHttpRequestFactory(httpClient);
|
||||
hrf.setConnectTimeout(1234);
|
||||
assertEquals(1234, httpClient.getParams().getIntParameter(
|
||||
org.apache.http.params.CoreConnectionPNames.CONNECTION_TIMEOUT, 0));
|
||||
|
||||
hrf.setReadTimeout(4567);
|
||||
assertEquals(4567, httpClient.getParams().getIntParameter(
|
||||
org.apache.http.params.CoreConnectionPNames.SO_TIMEOUT, 0));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void assertCustomConfig() throws Exception {
|
||||
HttpClient httpClient = HttpClientBuilder.create().build();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2015 the original author or authors.
|
||||
* Copyright 2002-2016 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -34,21 +34,6 @@ import static org.mockito.Mockito.*;
|
||||
*/
|
||||
public class HttpComponentsHttpInvokerRequestExecutorTests {
|
||||
|
||||
@SuppressWarnings("deprecation")
|
||||
@Test
|
||||
public void assertLegacyCustomConfig() {
|
||||
HttpClient httpClient = new org.apache.http.impl.client.DefaultHttpClient(); // Does not support RequestConfig
|
||||
HttpComponentsHttpInvokerRequestExecutor executor = new HttpComponentsHttpInvokerRequestExecutor(httpClient);
|
||||
|
||||
executor.setConnectTimeout(1234);
|
||||
assertEquals(1234, httpClient.getParams().getIntParameter(
|
||||
org.apache.http.params.CoreConnectionPNames.CONNECTION_TIMEOUT, 0));
|
||||
|
||||
executor.setReadTimeout(4567);
|
||||
assertEquals(4567, httpClient.getParams().getIntParameter(
|
||||
org.apache.http.params.CoreConnectionPNames.SO_TIMEOUT, 0));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void customizeConnectionTimeout() throws IOException {
|
||||
HttpComponentsHttpInvokerRequestExecutor executor = new HttpComponentsHttpInvokerRequestExecutor();
|
||||
|
||||
Reference in New Issue
Block a user