From 285dcb02c86ee06c7b86a4b56dc1a78b15c17ad2 Mon Sep 17 00:00:00 2001 From: Thomas <> Date: Thu, 28 Mar 2024 18:46:16 +0100 Subject: feat(http): add configuration parameter to set 'time-to-life' and 'validation-after-inactivity' for ConnectionPool --- .../java/at/gv/egiz/eaaf/core/test/http/HttpClientFactoryTest.java | 4 +--- eaaf_core_utils/src/test/resources/data/config1.properties | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'eaaf_core_utils/src/test') diff --git a/eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/test/http/HttpClientFactoryTest.java b/eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/test/http/HttpClientFactoryTest.java index 493d966b..7f0240ef 100644 --- a/eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/test/http/HttpClientFactoryTest.java +++ b/eaaf_core_utils/src/test/java/at/gv/egiz/eaaf/core/test/http/HttpClientFactoryTest.java @@ -18,8 +18,6 @@ import java.security.Provider; import java.security.UnrecoverableKeyException; import java.security.cert.X509Certificate; -import javax.net.ssl.SSLHandshakeException; - import org.apache.commons.lang3.RandomStringUtils; import org.apache.hc.client5.http.ClientProtocolException; import org.apache.hc.client5.http.classic.methods.HttpGet; @@ -278,7 +276,7 @@ public class HttpClientFactoryTest { // perform test request final HttpUriRequest httpGet2 = new HttpGet(mockServerUrl.url().toString()); - assertThrows(SSLHandshakeException.class, () -> client.execute(httpGet2)); + assertThrows(Exception.class, () -> client.execute(httpGet2)); } diff --git a/eaaf_core_utils/src/test/resources/data/config1.properties b/eaaf_core_utils/src/test/resources/data/config1.properties index 12209d21..1bcc1fb3 100644 --- a/eaaf_core_utils/src/test/resources/data/config1.properties +++ b/eaaf_core_utils/src/test/resources/data/config1.properties @@ -4,6 +4,7 @@ security.hsmfacade.trustedsslcert=src/test/resources/data/hsm_facade_trust_root. security.hsmfacade.username=authhandler-junit security.hsmfacade.password=supersecret123 +client.http.connection.pool.use=true client.http.connection.timeout.socket=2 client.http.connection.timeout.connection=2 client.http.connection.timeout.request=2 -- cgit v1.2.3