This is an automated email from the ASF dual-hosted git repository. apkhmv pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/ignite-3.git
The following commit(s) were added to refs/heads/main by this push: new f5029cad58 IGNITE-21651 Fix ItSslClientHandlerTest on Java 21 (#3333) f5029cad58 is described below commit f5029cad588b06df2bcf8f93b0dbf87f3c567d62 Author: Roman Puchkovskiy <roman.puchkovs...@gmail.com> AuthorDate: Tue Mar 5 14:50:58 2024 +0400 IGNITE-21651 Fix ItSslClientHandlerTest on Java 21 (#3333) Our tests use Netty tools to generate self-signed certificates. These tools use OpenJDK internal classes to do it with Reflection to invoke their methods. In Java 21, one of the needed methods (set()) does not exist anymore, so OpenJDK's classes cannot be used anymore. This commit switches the certificate generation logic in tests to BouncyCastle by adding it to the test classpath. --- gradle/libs.versions.toml | 4 ++++ modules/client-handler/build.gradle | 1 + modules/network/build.gradle | 1 + 3 files changed, 6 insertions(+) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 92d9d4284b..da7a8bc308 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -18,6 +18,7 @@ [versions] assertj = "3.22.0" asm = "9.1" +bouncycastle = "1.76" compileTesting = "0.19" fliptables = "1.1.0" fmpp = "0.9.16" @@ -100,6 +101,9 @@ ideaext = "org.jetbrains.gradle.plugin.idea-ext:1.1.7" [libraries] assertj-core = { module = "org.assertj:assertj-core", version.ref = "assertj" } +bouncycastle-bcprov-jdk18on = { module = "org.bouncycastle:bcprov-jdk18on", version.ref = "bouncycastle" } +bouncycastle-bcpkix-jdk18on = { module = "org.bouncycastle:bcpkix-jdk18on", version.ref = "bouncycastle" } + jetbrains-annotations = { module = "org.jetbrains:annotations", version.ref = "jetbrainsAnnotations" } hamcrest-core = { module = "org.hamcrest:hamcrest", version.ref = "hamcrest" } diff --git a/modules/client-handler/build.gradle b/modules/client-handler/build.gradle index b9cc242afd..809cab45a8 100644 --- a/modules/client-handler/build.gradle +++ b/modules/client-handler/build.gradle @@ -81,6 +81,7 @@ dependencies { integrationTestImplementation libs.msgpack.core integrationTestImplementation libs.netty.handler integrationTestImplementation libs.jetbrains.annotations + integrationTestImplementation libs.bouncycastle.bcpkix.jdk18on; testFixturesImplementation project(':ignite-core') testFixturesImplementation project(':ignite-placement-driver-api') diff --git a/modules/network/build.gradle b/modules/network/build.gradle index a67a1c3925..044c1d1935 100644 --- a/modules/network/build.gradle +++ b/modules/network/build.gradle @@ -65,6 +65,7 @@ dependencies { testImplementation libs.bytebuddy testImplementation libs.compileTesting testImplementation libs.awaitility + testImplementation libs.bouncycastle.bcpkix.jdk18on; testFixturesAnnotationProcessor project(":ignite-network-annotation-processor") testFixturesImplementation project(':ignite-configuration')