diff --git a/dependencies/pom.xml b/dependencies/pom.xml index 762f51332dc..0695cab8881 100644 --- a/dependencies/pom.xml +++ b/dependencies/pom.xml @@ -108,7 +108,7 @@ 8.4.1.jre8 8.0.22 5.9.3.Final - 4.1.51.Final + 4.1.58.Final 1.28.0 19.8.0.0 19.3.0.0 diff --git a/grpc/client/src/test/java/io/helidon/grpc/client/GrpcChannelsProviderIT.java b/grpc/client/src/test/java/io/helidon/grpc/client/GrpcChannelsProviderIT.java index 7777b5d5842..33a90a693dc 100644 --- a/grpc/client/src/test/java/io/helidon/grpc/client/GrpcChannelsProviderIT.java +++ b/grpc/client/src/test/java/io/helidon/grpc/client/GrpcChannelsProviderIT.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, 2020 Oracle and/or its affiliates. + * Copyright (c) 2019, 2021 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -35,12 +35,14 @@ import io.grpc.EquivalentAddressGroup; import io.grpc.NameResolver; import io.grpc.StatusRuntimeException; +import io.netty.handler.codec.DecoderException; import org.junit.jupiter.api.AfterAll; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; import services.TreeMapService; import static org.hamcrest.CoreMatchers.equalTo; +import static org.hamcrest.CoreMatchers.instanceOf; import static org.hamcrest.MatcherAssert.assertThat; import static org.junit.jupiter.api.Assertions.assertThrows; @@ -185,13 +187,15 @@ public void shouldNotConnectWithoutCaCertTo2WaySslServer() { @Test public void shouldNotConnectWithoutClientCertTo2WaySslServer() { StatusRuntimeException sre = assertThrows(StatusRuntimeException.class, () -> invokeUnary(port2WaySSL, WITH_CA_CERT + WITH_CLIENT_KEY)); - assertThat(sre.getCause().getClass(), equalTo(javax.net.ssl.SSLHandshakeException.class)); + assertThat(sre.getCause(), instanceOf(DecoderException.class)); + assertThat(sre.getCause().getCause(), instanceOf(SSLException.class)); } @Test public void shouldNotConnectWithoutClientKeyTo2WaySslServer() { StatusRuntimeException sre = assertThrows(StatusRuntimeException.class, () -> invokeUnary(port2WaySSL, WITH_CA_CERT + WITH_CLIENT_CERT)); - assertThat(sre.getCause().getClass(), equalTo(javax.net.ssl.SSLHandshakeException.class)); + assertThat(sre.getCause(), instanceOf(DecoderException.class)); + assertThat(sre.getCause().getCause(), instanceOf(SSLException.class)); } @Test diff --git a/tests/integration/webclient/src/test/java/io/helidon/tests/integration/webclient/MutualTlsTest.java b/tests/integration/webclient/src/test/java/io/helidon/tests/integration/webclient/MutualTlsTest.java index 2d45f842ab1..f1870b6171b 100644 --- a/tests/integration/webclient/src/test/java/io/helidon/tests/integration/webclient/MutualTlsTest.java +++ b/tests/integration/webclient/src/test/java/io/helidon/tests/integration/webclient/MutualTlsTest.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2020 Oracle and/or its affiliates. + * Copyright (c) 2020, 2021 Oracle and/or its affiliates. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -32,6 +32,7 @@ import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.Test; +import static org.hamcrest.CoreMatchers.containsString; import static org.hamcrest.CoreMatchers.endsWith; import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.MatcherAssert.assertThat; @@ -80,7 +81,7 @@ public void testNoClientCert() { CompletionException exception = assertThrows(CompletionException.class, () -> callSecured(webClient, webServer.port("secured"))); - assertThat(exception.getCause().getMessage(), is("Received fatal alert: bad_certificate")); + assertThat(exception.getCause().getMessage(), containsString("Received fatal alert: bad_certificate")); } @Test