diff --git a/jest/src/main/java/io/searchbox/client/JestClientFactory.java b/jest/src/main/java/io/searchbox/client/JestClientFactory.java index f4d16dab2..f384f928e 100755 --- a/jest/src/main/java/io/searchbox/client/JestClientFactory.java +++ b/jest/src/main/java/io/searchbox/client/JestClientFactory.java @@ -149,7 +149,7 @@ protected HttpRoutePlanner getRoutePlanner() { // Extension point protected RequestConfig getRequestConfig() { return RequestConfig.custom() - .setConnectionRequestTimeout(httpClientConfig.getConnTimeout()) + .setConnectTimeout(httpClientConfig.getConnTimeout()) .setSocketTimeout(httpClientConfig.getReadTimeout()) .build(); } diff --git a/jest/src/test/java/io/searchbox/client/JestClientFactoryTest.java b/jest/src/test/java/io/searchbox/client/JestClientFactoryTest.java index 79ca2c1bc..b151eaf5c 100755 --- a/jest/src/test/java/io/searchbox/client/JestClientFactoryTest.java +++ b/jest/src/test/java/io/searchbox/client/JestClientFactoryTest.java @@ -28,7 +28,7 @@ public void clientCreationWithTimeout() { factory.setHttpClientConfig(httpClientConfig); final RequestConfig defaultRequestConfig = factory.getRequestConfig(); assertNotNull(defaultRequestConfig); - assertEquals(150, defaultRequestConfig.getConnectionRequestTimeout()); + assertEquals(150, defaultRequestConfig.getConnectTimeout()); assertEquals(300, defaultRequestConfig.getSocketTimeout()); }