mirror of
https://github.com/spring-projects/spring-framework
synced 2026-06-08 17:33:33 +00:00
Deprecate setConnectTimeout on HttpComponents client factory
Prior to this commit, the `HttpComponentsClientHttpRequestFactory` would set the connection timeout on the request configuration. This has been deprecated by the client itself and this value should be set while creating the client on the connection manager itself. This commit deprecates this method, as there is no way for the factory to set this value anymore. Closes gh-35748
This commit is contained in:
+2
-2
@@ -61,7 +61,7 @@ class HttpComponentsClientHttpRequestFactoryTests extends AbstractHttpRequestFac
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("deprecation")
|
||||
@SuppressWarnings("removal")
|
||||
void assertCustomConfig() throws Exception {
|
||||
HttpClient httpClient = HttpClientBuilder.create().build();
|
||||
HttpComponentsClientHttpRequestFactory hrf = new HttpComponentsClientHttpRequestFactory(httpClient);
|
||||
@@ -103,7 +103,7 @@ class HttpComponentsClientHttpRequestFactoryTests extends AbstractHttpRequestFac
|
||||
}
|
||||
|
||||
@Test
|
||||
@SuppressWarnings("deprecation")
|
||||
@SuppressWarnings("removal")
|
||||
void localSettingsOverrideClientDefaultSettings() throws Exception {
|
||||
RequestConfig defaultConfig = RequestConfig.custom()
|
||||
.setConnectTimeout(1234, MILLISECONDS)
|
||||
|
||||
Reference in New Issue
Block a user