From 0c9d12d8e07efcf7d143de78f4a7c940ea645990 Mon Sep 17 00:00:00 2001 From: hsiegeln <37154749+hsiegeln@users.noreply.github.com> Date: Sun, 19 Apr 2026 16:08:43 +0200 Subject: [PATCH] test(http): tighten SSL-failure assertion + null-guard WireMock teardown Co-Authored-By: Claude Opus 4.7 (1M context) --- .../server/app/http/ApacheOutboundHttpClientFactoryIT.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cameleer-server-app/src/test/java/com/cameleer/server/app/http/ApacheOutboundHttpClientFactoryIT.java b/cameleer-server-app/src/test/java/com/cameleer/server/app/http/ApacheOutboundHttpClientFactoryIT.java index cd797c5f..bc9fc7d3 100644 --- a/cameleer-server-app/src/test/java/com/cameleer/server/app/http/ApacheOutboundHttpClientFactoryIT.java +++ b/cameleer-server-app/src/test/java/com/cameleer/server/app/http/ApacheOutboundHttpClientFactoryIT.java @@ -38,7 +38,7 @@ class ApacheOutboundHttpClientFactoryIT { @AfterEach void tearDown() { - wm.stop(); + if (wm != null) wm.stop(); } @Test @@ -55,7 +55,7 @@ class ApacheOutboundHttpClientFactoryIT { void systemDefaultRejectsSelfSignedCert() { CloseableHttpClient client = factory.clientFor(OutboundHttpRequestContext.systemDefault()); assertThatThrownBy(() -> client.execute(new HttpGet("https://localhost:" + wm.httpsPort() + "/ping"))) - .hasMessageContaining("PKIX"); + .isInstanceOfAny(javax.net.ssl.SSLException.class, javax.net.ssl.SSLHandshakeException.class); } @Test