Skip to content

Commit 5ba61c3

Browse files
Make JolokiaKubernetesClientSSLTest.clientSSLAuthentication check for expected exception type on JDK 25
Fixes #7894
1 parent 1cb7c69 commit 5ba61c3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

integration-tests/jolokia/src/test/java/org/apache/camel/quarkus/component/jolokia/it/JolokiaKubernetesClientSSLTest.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,12 @@
2828
import io.smallrye.certs.junit5.Certificate;
2929
import io.smallrye.certs.junit5.Certificates;
3030
import org.apache.http.NoHttpResponseException;
31+
import org.apache.http.client.ClientProtocolException;
3132
import org.junit.jupiter.api.BeforeEach;
3233
import org.junit.jupiter.api.Test;
3334

35+
import static org.assertj.core.api.Assertions.assertThatThrownBy;
3436
import static org.hamcrest.Matchers.equalTo;
35-
import static org.junit.jupiter.api.Assertions.assertThrows;
3637

3738
@Certificates(baseDir = "target/certs", certificates = {
3839
@Certificate(name = "kubernetes-service-cert", formats = { Format.PKCS12,
@@ -53,12 +54,12 @@ public void beforeEach() {
5354
@Test
5455
void clientSSLAuthentication() {
5556
// Plain HTTP should be disabled
56-
assertThrows(NoHttpResponseException.class, () -> {
57+
assertThatThrownBy(() -> {
5758
RestAssured.given()
5859
.get("/jolokia/")
5960
.then()
6061
.statusCode(200);
61-
});
62+
}).isInstanceOfAny(NoHttpResponseException.class, ClientProtocolException.class);
6263

6364
RestAssured.config = RestAssured.config().with().sslConfig(getSSLConfig());
6465
RestAssured.given()

0 commit comments

Comments
 (0)