Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade Netty to 4.1.58 #2678

Merged
merged 1 commit into from
Jan 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion dependencies/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
<version.lib.mssql-jdbc>8.4.1.jre8</version.lib.mssql-jdbc>
<version.lib.mysql-connector-java>8.0.22</version.lib.mysql-connector-java>
<version.lib.narayana>5.9.3.Final</version.lib.narayana>
<version.lib.netty>4.1.51.Final</version.lib.netty>
<version.lib.netty>4.1.58.Final</version.lib.netty>
<version.lib.oci-java-sdk-objectstorage>1.28.0</version.lib.oci-java-sdk-objectstorage>
<version.lib.ojdbc8>19.8.0.0</version.lib.ojdbc8>
<version.lib.database.messaging>19.3.0.0</version.lib.database.messaging>
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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
Expand Down