|
19 | 19 |
|
20 | 20 | package co.elastic.clients.transport.rest5_client.low_level; |
21 | 21 |
|
22 | | -import org.apache.hc.client5.http.config.RequestConfig; |
23 | 22 | import org.apache.hc.client5.http.impl.async.CloseableHttpAsyncClient; |
24 | 23 | import org.apache.hc.client5.http.impl.async.HttpAsyncClients; |
25 | 24 | import org.apache.hc.core5.http.Header; |
@@ -179,29 +178,4 @@ private static void assertSetPathPrefixThrows(final String pathPrefix) { |
179 | 178 | assertThat(e.getMessage(), containsString(pathPrefix)); |
180 | 179 | } |
181 | 180 | } |
182 | | - |
183 | | - /** |
184 | | - * This test verifies that we don't change the default value for the connection request timeout as that |
185 | | - * causes problems. |
186 | | - * See https://github.com/elastic/elasticsearch/issues/24069 |
187 | | - */ |
188 | | - @Test |
189 | | - public void testDefaultConnectionRequestTimeout() throws IOException { |
190 | | - Rest5ClientBuilder builder = Rest5Client.builder(new HttpHost("localhost", 9200)); |
191 | | - |
192 | | - RequestConfig requestConfig = RequestConfig.custom().build(); |
193 | | - assertEquals(RequestConfig.DEFAULT.getConnectionRequestTimeout(), |
194 | | - requestConfig.getConnectionRequestTimeout()); |
195 | | - // this way we get notified if the default ever changes |
196 | | - // TODO IT CHANGED from -1 to 3 minutes, does it mean we always need to explicitly set it? |
197 | | - //assertEquals(-1, requestConfig.getConnectionRequestTimeout()); |
198 | | - |
199 | | - CloseableHttpAsyncClient httpclient = HttpAsyncClients.custom() |
200 | | - .setDefaultRequestConfig(requestConfig) |
201 | | - .build(); |
202 | | - |
203 | | - try (Rest5Client restClient = builder.build()) { |
204 | | - assertNotNull(restClient); |
205 | | - } |
206 | | - } |
207 | 181 | } |
0 commit comments