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:
Brian Clozel
2025-11-03 16:53:54 +01:00
parent 16822c2fd0
commit d65de19e7d
2 changed files with 14 additions and 2 deletions
@@ -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)