From e66f9b423c9c39cf0d5bed5e88f0329c7e15b63b Mon Sep 17 00:00:00 2001 From: Craig Perkins Date: Fri, 15 Nov 2024 09:44:27 -0500 Subject: [PATCH 1/7] Bump mockito from 5.14.1 to 5.14.2 Signed-off-by: Craig Perkins --- gradle/libs.versions.toml | 2 +- test/framework/build.gradle | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 6b5c10e071d1e..43f1a75bc6189 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -62,7 +62,7 @@ bouncycastle="1.78" randomizedrunner = "2.7.1" junit = "4.13.2" hamcrest = "2.1" -mockito = "5.14.1" +mockito = "5.14.2" objenesis = "3.2" bytebuddy = "1.15.4" diff --git a/test/framework/build.gradle b/test/framework/build.gradle index c65bf51c6af36..84a536fdf62c8 100644 --- a/test/framework/build.gradle +++ b/test/framework/build.gradle @@ -80,7 +80,8 @@ thirdPartyAudit.ignoreMissingClasses( 'org.apache.log4j.Priority', 'org.mockito.internal.creation.bytebuddy.inject.MockMethodDispatcher', 'org.opentest4j.AssertionFailedError', - 'net.bytebuddy.agent.ByteBuddyAgent' + 'net.bytebuddy.agent.ByteBuddyAgent', + 'net.bytebuddy.agent.Installer' ) // TODO - OpenSearch remove this violation. Issue: https://github.com/opensearch-project/OpenSearch/issues/420 thirdPartyAudit.ignoreViolations( From fcfd74c4d8f6a761ec1a92908cef1fad52c26e0e Mon Sep 17 00:00:00 2001 From: Craig Perkins Date: Fri, 15 Nov 2024 09:53:43 -0500 Subject: [PATCH 2/7] Update objenesis from 3.2 to 3.3 Signed-off-by: Craig Perkins --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 43f1a75bc6189..2d89a0ccba870 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -63,7 +63,7 @@ randomizedrunner = "2.7.1" junit = "4.13.2" hamcrest = "2.1" mockito = "5.14.2" -objenesis = "3.2" +objenesis = "3.3" bytebuddy = "1.15.4" # benchmark dependencies From eec394d8708bcd763518c9d865a881c10e706502 Mon Sep 17 00:00:00 2001 From: Craig Perkins Date: Fri, 15 Nov 2024 09:56:04 -0500 Subject: [PATCH 3/7] Add to CHANGELOG Signed-off-by: Craig Perkins --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5991d9593e259..726442d10cead 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,6 +32,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Bump `com.nimbusds:nimbus-jose-jwt` from 9.41.1 to 9.46 ([#16611](https://github.com/opensearch-project/OpenSearch/pull/16611)) - Bump `lycheeverse/lychee-action` from 2.0.2 to 2.1.0 ([#16610](https://github.com/opensearch-project/OpenSearch/pull/16610)) - Bump `me.champeau.gradle.japicmp` from 0.4.4 to 0.4.5 ([#16614](https://github.com/opensearch-project/OpenSearch/pull/16614)) +- Bump `mockito` from 5.14.1 to 5.14.2 and `objenesis` from 3.2 to 3.3 ([#16655](https://github.com/opensearch-project/OpenSearch/pull/16655)) ### Changed From 54a5becbf3249400580e84ed8e92305160c47c26 Mon Sep 17 00:00:00 2001 From: Craig Perkins Date: Fri, 15 Nov 2024 11:07:45 -0500 Subject: [PATCH 4/7] Update bytebuddy from 1.15.4 to 1.15.10 Signed-off-by: Craig Perkins --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 2d89a0ccba870..0695bbcdf067b 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -64,7 +64,7 @@ junit = "4.13.2" hamcrest = "2.1" mockito = "5.14.2" objenesis = "3.3" -bytebuddy = "1.15.4" +bytebuddy = "1.15.10" # benchmark dependencies jmh = "1.35" From 93cb5e6800314a2baf99ea07deb34f3572d58fc5 Mon Sep 17 00:00:00 2001 From: Craig Perkins Date: Fri, 15 Nov 2024 11:08:18 -0500 Subject: [PATCH 5/7] Update README Signed-off-by: Craig Perkins --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 726442d10cead..41873adf5f2ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -32,7 +32,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), - Bump `com.nimbusds:nimbus-jose-jwt` from 9.41.1 to 9.46 ([#16611](https://github.com/opensearch-project/OpenSearch/pull/16611)) - Bump `lycheeverse/lychee-action` from 2.0.2 to 2.1.0 ([#16610](https://github.com/opensearch-project/OpenSearch/pull/16610)) - Bump `me.champeau.gradle.japicmp` from 0.4.4 to 0.4.5 ([#16614](https://github.com/opensearch-project/OpenSearch/pull/16614)) -- Bump `mockito` from 5.14.1 to 5.14.2 and `objenesis` from 3.2 to 3.3 ([#16655](https://github.com/opensearch-project/OpenSearch/pull/16655)) +- Bump `mockito` from 5.14.1 to 5.14.2, `objenesis` from 3.2 to 3.3 and `bytebuddy` from 1.15.4 to 1.15.10 ([#16655](https://github.com/opensearch-project/OpenSearch/pull/16655)) ### Changed From c490e3be5b0f1f4a5eb5d3c9b2f8f450a13d5fab Mon Sep 17 00:00:00 2001 From: Craig Perkins Date: Fri, 15 Nov 2024 11:33:11 -0500 Subject: [PATCH 6/7] Add grant to mockito-core Signed-off-by: Craig Perkins --- .../resources/org/opensearch/bootstrap/test-framework.policy | 1 + 1 file changed, 1 insertion(+) diff --git a/server/src/main/resources/org/opensearch/bootstrap/test-framework.policy b/server/src/main/resources/org/opensearch/bootstrap/test-framework.policy index 19f8adbe003ca..eb1289f0449b4 100644 --- a/server/src/main/resources/org/opensearch/bootstrap/test-framework.policy +++ b/server/src/main/resources/org/opensearch/bootstrap/test-framework.policy @@ -45,6 +45,7 @@ grant codeBase "${codebase.mockito-core}" { permission java.lang.RuntimePermission "accessDeclaredMembers"; permission java.lang.reflect.ReflectPermission "suppressAccessChecks"; permission java.lang.RuntimePermission "getClassLoader"; + permission java.lang.RuntimePermission "createClassLoader"; }; grant codeBase "${codebase.objenesis}" { From f5ec04538f442e15ec027d38037cbc0a496dbc17 Mon Sep 17 00:00:00 2001 From: Craig Perkins Date: Fri, 15 Nov 2024 12:11:18 -0500 Subject: [PATCH 7/7] Add perms Signed-off-by: Craig Perkins --- .../org/opensearch/bootstrap/test-framework.policy | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/server/src/main/resources/org/opensearch/bootstrap/test-framework.policy b/server/src/main/resources/org/opensearch/bootstrap/test-framework.policy index eb1289f0449b4..c62adda511140 100644 --- a/server/src/main/resources/org/opensearch/bootstrap/test-framework.policy +++ b/server/src/main/resources/org/opensearch/bootstrap/test-framework.policy @@ -45,7 +45,13 @@ grant codeBase "${codebase.mockito-core}" { permission java.lang.RuntimePermission "accessDeclaredMembers"; permission java.lang.reflect.ReflectPermission "suppressAccessChecks"; permission java.lang.RuntimePermission "getClassLoader"; + permission java.lang.RuntimePermission "createClassLoader"; + permission java.lang.RuntimePermission "net.bytebuddy.createJavaDispatcher"; + permission java.lang.reflect.ReflectPermission "newProxyInPackage.net.bytebuddy.utility"; + permission java.lang.reflect.ReflectPermission "newProxyInPackage.net.bytebuddy.dynamic.loading"; + permission java.lang.reflect.ReflectPermission "newProxyInPackage.net.bytebuddy.description.type"; + permission java.lang.reflect.ReflectPermission "newProxyInPackage.net.bytebuddy.description.method"; }; grant codeBase "${codebase.objenesis}" {