From 1bea324589646ff292b73f0c872bdeae6be86c0b Mon Sep 17 00:00:00 2001 From: Roman Khachatryan Date: Wed, 15 Feb 2023 14:14:33 +0100 Subject: [PATCH] Upgrade netty to 4.1.86 #2 (#9770) * Revert "Revert "[KSE-1612] Upgrade netty to 4.1.86 and vertx to 4.3.7 (#9764)" (#9766)" This reverts commit 1ecd4f7b95165743317b348b876f405827051878. * Fix KsqlClientTest Update exception expectations in KsqlClientTest according to the upgraded vert.x. * Update origin in CorsTest as per OWASP Include schema into the ORIGIN, see https://github.com/vert-x3/vertx-web/commit/c667f07d14cba3e59f39a8b4abc7b4017258cf8c --- .../src/test/java/io/confluent/ksql/api/CorsTest.java | 4 ++-- .../java/io/confluent/ksql/rest/client/KsqlClientTest.java | 5 +++-- pom.xml | 6 +++--- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/ksqldb-rest-app/src/test/java/io/confluent/ksql/api/CorsTest.java b/ksqldb-rest-app/src/test/java/io/confluent/ksql/api/CorsTest.java index 7694ea5a7ae7..dcd03b434254 100644 --- a/ksqldb-rest-app/src/test/java/io/confluent/ksql/api/CorsTest.java +++ b/ksqldb-rest-app/src/test/java/io/confluent/ksql/api/CorsTest.java @@ -49,7 +49,7 @@ public class CorsTest extends BaseApiTest { private static final String DEFAULT_ACCESS_CONTROL_ALLOW_METHODS = "GET,POST,HEAD"; private static final String URI = "/query-stream"; - private static final String ORIGIN = "wibble.com"; + private static final String ORIGIN = "http://wibble.com"; private final Map config = new HashMap<>(); @@ -132,7 +132,7 @@ public void shouldRejectCorsRequestOriginExactMatch() throws Exception { @Test public void shouldAcceptCorsRequestOriginExactMatchOneOfList() throws Exception { - shouldAcceptCorsRequest(ORIGIN, "foo.com,wibble.com"); + shouldAcceptCorsRequest(ORIGIN, "foo.com," + ORIGIN); } @Test diff --git a/ksqldb-rest-client/src/test/java/io/confluent/ksql/rest/client/KsqlClientTest.java b/ksqldb-rest-client/src/test/java/io/confluent/ksql/rest/client/KsqlClientTest.java index 16c7af820fd9..1715ae5f5db5 100644 --- a/ksqldb-rest-client/src/test/java/io/confluent/ksql/rest/client/KsqlClientTest.java +++ b/ksqldb-rest-client/src/test/java/io/confluent/ksql/rest/client/KsqlClientTest.java @@ -537,7 +537,7 @@ public void shouldFailToStartClientRequestWithNullKeystorePassword() throws Exce ); // Then: - assertThat(e.getMessage(), containsString( + assertThat(e.getCause().getMessage(), containsString( "java.io.IOException: Keystore was tampered with, or password was incorrect" )); } @@ -558,7 +558,7 @@ public void shouldFailToStartClientRequestWithInvalidKeystorePassword() throws E ); // Then: - assertThat(e.getMessage(), containsString( + assertThat(e.getCause().getMessage(), containsString( "java.io.IOException: Keystore was tampered with, or password was incorrect" )); } @@ -786,6 +786,7 @@ private void startClientWithTlsAndTruststorePassword(final String password) { props.putAll(ClientTrustStore.trustStoreProps()); props.put(SslConfigs.SSL_TRUSTSTORE_PASSWORD_CONFIG, password); createClient(props); + ksqlClient.target(serverUri).getServerInfo().get(); } private void startServerWithTls() throws Exception { diff --git a/pom.xml b/pom.xml index e6cd33b7f84b..05ea2506dc5f 100644 --- a/pom.xml +++ b/pom.xml @@ -131,7 +131,7 @@ 2.24.0 2.9.5 67.1 - 3.9.14 + 4.3.7 1.0.3 true true @@ -151,8 +151,8 @@ Please check top level `pom.xml` at https://github.com/netty/netty for the netty version we bump to (ie, corresponding git tag), to find the correct `tcnative` version. --> - 4.1.84.Final - 4.1.84.Final + 4.1.86.Final + 4.1.86.Final 2.34