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