Skip to content

Commit

Permalink
Upgrade mockito (elastic#121849)
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-vieira committed Feb 6, 2025
1 parent 2f9f364 commit 806cad5
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 16 deletions.
6 changes: 3 additions & 3 deletions client/test/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ dependencies {
api "org.hamcrest:hamcrest:${versions.hamcrest}"

// mockito
api 'org.mockito:mockito-core:5.11.0'
api 'org.mockito:mockito-subclass:5.11.0'
api 'net.bytebuddy:byte-buddy:1.14.12'
api 'org.mockito:mockito-core:5.15.2'
api 'org.mockito:mockito-subclass:5.15.2'
api 'net.bytebuddy:byte-buddy:1.15.11'
api 'org.objenesis:objenesis:3.3'
}

Expand Down
2 changes: 1 addition & 1 deletion gradle/build.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ apache-compress = "org.apache.commons:commons-compress:1.26.1"
apache-rat = "org.apache.rat:apache-rat:0.11"
asm = { group = "org.ow2.asm", name="asm", version.ref="asm" }
asm-tree = { group = "org.ow2.asm", name="asm-tree", version.ref="asm" }
bytebuddy = "net.bytebuddy:byte-buddy:1.14.12"
bytebuddy = "net.bytebuddy:byte-buddy:1.15.11"
checkstyle = "com.puppycrawl.tools:checkstyle:10.3"
commons-codec = "commons-codec:commons-codec:1.11"
commmons-io = "commons-io:commons-io:2.2"
Expand Down
18 changes: 9 additions & 9 deletions gradle/verification-metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1704,9 +1704,9 @@
<sha256 value="1d31696445697720527091754369082a6651bd49781b6005deb94e56753406f9" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="net.bytebuddy" name="byte-buddy" version="1.14.12">
<artifact name="byte-buddy-1.14.12.jar">
<sha256 value="970636134d61c183b19f8f58fa631e30d2f2abca344b37848a393cac7863dd70" origin="Generated by Gradle"/>
<component group="net.bytebuddy" name="byte-buddy" version="1.15.11">
<artifact name="byte-buddy-1.15.11.jar">
<sha256 value="fa08998aae1e7bdae83bde0712c50e8444d71c0e0c196bb2247ade8d4ad0eb90" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="net.java.dev.jets3t" name="jets3t" version="0.9.0">
Expand Down Expand Up @@ -4048,14 +4048,14 @@
<sha256 value="f97483ba0944b9fa133aa29638764ddbeadb51ec3dbc02074c58fa2caecd07fa" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.mockito" name="mockito-core" version="5.11.0">
<artifact name="mockito-core-5.11.0.jar">
<sha256 value="f076c96b1f49b8d9bc42e46b0969aaf5684c40c8b5b679d400e5d880073a0e00" origin="Generated by Gradle"/>
<component group="org.mockito" name="mockito-core" version="5.15.2">
<artifact name="mockito-core-5.15.2.jar">
<sha256 value="bf48b7372d9491d5ec8aebb4cdd187d15663931599c0fbe7410166ce0e1e58ff" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.mockito" name="mockito-subclass" version="5.11.0">
<artifact name="mockito-subclass-5.11.0.jar">
<sha256 value="61e65116bf6178cd3a5f1cecc0d73d68395e7c175d07a7f9478650f55b36fb1d" origin="Generated by Gradle"/>
<component group="org.mockito" name="mockito-subclass" version="5.15.2">
<artifact name="mockito-subclass-5.15.2.jar">
<sha256 value="bf332f658d5437446525911449da3474be170053735bf870ac2caaeaffc2fd34" origin="Generated by Gradle"/>
</artifact>
</component>
<component group="org.mortbay.jetty" name="jetty" version="6.1.26">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ grant codeBase "${codebase.mockito-core}" {
permission java.lang.RuntimePermission "accessDeclaredMembers";
permission java.lang.reflect.ReflectPermission "suppressAccessChecks";
permission java.lang.RuntimePermission "getClassLoader";
// needed when calling bytebuddy
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.byte-buddy}" {
Expand Down
7 changes: 4 additions & 3 deletions test/framework/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ dependencies {
api "commons-codec:commons-codec:${versions.commonscodec}"

// mockito
api 'org.mockito:mockito-core:5.11.0'
api 'org.mockito:mockito-subclass:5.11.0'
api 'net.bytebuddy:byte-buddy:1.14.12'
api 'org.mockito:mockito-core:5.15.2'
api 'org.mockito:mockito-subclass:5.15.2'
api 'net.bytebuddy:byte-buddy:1.15.11'
api 'org.objenesis:objenesis:3.3'

api "org.elasticsearch:mocksocket:${versions.mocksocket}"
Expand Down Expand Up @@ -65,6 +65,7 @@ tasks.named("thirdPartyAudit").configure {
'org.apache.log4j.Priority',

// mockito
'net.bytebuddy.agent.Installer',
'net.bytebuddy.agent.ByteBuddyAgent',
'org.mockito.internal.creation.bytebuddy.inject.MockMethodDispatcher',
'org.opentest4j.AssertionFailedError',
Expand Down

0 comments on commit 806cad5

Please sign in to comment.