From 17f59a6479c260af29bd385ae9cf5afb9a4ea8d9 Mon Sep 17 00:00:00 2001 From: Piotr Findeisen Date: Mon, 22 Apr 2024 17:10:17 +0200 Subject: [PATCH] Remove unused deprecated configuration --- .../io/airlift/http/client/HttpClientConfig.java | 16 +--------------- .../http/client/TestHttpClientConfig.java | 4 ---- 2 files changed, 1 insertion(+), 19 deletions(-) diff --git a/http-client/src/main/java/io/airlift/http/client/HttpClientConfig.java b/http-client/src/main/java/io/airlift/http/client/HttpClientConfig.java index 0c54ba36c5..40453eb209 100644 --- a/http-client/src/main/java/io/airlift/http/client/HttpClientConfig.java +++ b/http-client/src/main/java/io/airlift/http/client/HttpClientConfig.java @@ -50,6 +50,7 @@ "http-client.authentication.krb5.principal", "http-client.authentication.krb5.remote-service-name", "http-client.authentication.krb5.service-principal-pattern", + "http-client.keep-alive-interval", "http-client.max-connections", "http.authentication.krb5.config", "http.authentication.krb5.credential-cache", @@ -66,7 +67,6 @@ public class HttpClientConfig private Duration connectTimeout = new Duration(5, SECONDS); private Duration requestTimeout = new Duration(5, MINUTES); private Duration idleTimeout = new Duration(1, MINUTES); - private Duration keepAliveInterval; private int maxConnectionsPerServer = 20; private int maxRequestsQueuedPerDestination = 1024; private DataSize maxContentLength = DataSize.of(16, MEGABYTE); @@ -184,20 +184,6 @@ public HttpClientConfig setIdleTimeout(Duration idleTimeout) return this; } - @Deprecated - public Duration getKeepAliveInterval() - { - return keepAliveInterval; - } - - @Deprecated - @Config("http-client.keep-alive-interval") - public HttpClientConfig setKeepAliveInterval(Duration keepAliveInterval) - { - this.keepAliveInterval = keepAliveInterval; - return this; - } - @Min(1) public int getMaxConnectionsPerServer() { diff --git a/http-client/src/test/java/io/airlift/http/client/TestHttpClientConfig.java b/http-client/src/test/java/io/airlift/http/client/TestHttpClientConfig.java index 53a0aa47d8..d40a501740 100644 --- a/http-client/src/test/java/io/airlift/http/client/TestHttpClientConfig.java +++ b/http-client/src/test/java/io/airlift/http/client/TestHttpClientConfig.java @@ -41,7 +41,6 @@ import static java.util.concurrent.TimeUnit.SECONDS; import static org.assertj.core.api.Assertions.assertThatThrownBy; -@SuppressWarnings("deprecation") public class TestHttpClientConfig { @Test @@ -53,7 +52,6 @@ public void testDefaults() .setConnectTimeout(new Duration(5, SECONDS)) .setRequestTimeout(new Duration(5, MINUTES)) .setIdleTimeout(new Duration(1, MINUTES)) - .setKeepAliveInterval(null) .setMaxConnectionsPerServer(20) .setMaxRequestsQueuedPerDestination(1024) .setMaxContentLength(DataSize.of(16, MEGABYTE)) @@ -100,7 +98,6 @@ public void testExplicitPropertyMappings() .put("http-client.connect-timeout", "4s") .put("http-client.request-timeout", "15s") .put("http-client.idle-timeout", "5s") - .put("http-client.keep-alive-interval", "6s") .put("http-client.max-connections-per-server", "3") .put("http-client.max-requests-queued-per-destination", "10") .put("http-client.max-content-length", "1MB") @@ -144,7 +141,6 @@ public void testExplicitPropertyMappings() .setConnectTimeout(new Duration(4, SECONDS)) .setRequestTimeout(new Duration(15, SECONDS)) .setIdleTimeout(new Duration(5, SECONDS)) - .setKeepAliveInterval(new Duration(6, SECONDS)) .setMaxConnectionsPerServer(3) .setMaxRequestsQueuedPerDestination(10) .setMaxContentLength(DataSize.of(1, MEGABYTE))