This is an automated email from the ASF dual-hosted git repository. lhotari pushed a commit to branch branch-4.0 in repository https://gitbox.apache.org/repos/asf/pulsar.git
commit 0e7d9678ffa5d01df9ae0b586a022bcb7c295c36 Author: Lari Hotari <lhot...@users.noreply.github.com> AuthorDate: Wed May 7 14:11:22 2025 +0300 [improve][build] Upgrade Mockito to 5.17.0 and byte-buddy to 1.15.11 (#24241) (cherry picked from commit 83dea9ed0d5362f9064d5e2089b95f906b22198b) --- buildtools/pom.xml | 16 ++++++++++++++-- distribution/server/src/assemble/LICENSE.bin.txt | 2 +- pom.xml | 10 +++++++--- 3 files changed, 22 insertions(+), 6 deletions(-) diff --git a/buildtools/pom.xml b/buildtools/pom.xml index 86455f21d27..cdea7c6c9d6 100644 --- a/buildtools/pom.xml +++ b/buildtools/pom.xml @@ -59,7 +59,8 @@ <guava.version>32.1.2-jre</guava.version> <ant.version>1.10.12</ant.version> <snakeyaml.version>2.0</snakeyaml.version> - <mockito.version>5.6.0</mockito.version> + <mockito.version>5.17.0</mockito.version> + <byte-buddy.version>1.15.11</byte-buddy.version> <!-- required for running tests on JDK11+ --> <test.additional.args> --add-opens java.base/jdk.internal.loader=ALL-UNNAMED @@ -85,6 +86,18 @@ <type>pom</type> <scope>import</scope> </dependency> + <dependency> + <groupId>org.mockito</groupId> + <artifactId>mockito-bom</artifactId> + <version>${mockito.version}</version> + <type>pom</type> + <scope>import</scope> + </dependency> + <dependency> + <groupId>net.bytebuddy</groupId> + <artifactId>byte-buddy</artifactId> + <version>${byte-buddy.version}</version> + </dependency> </dependencies> </dependencyManagement> @@ -159,7 +172,6 @@ <dependency> <groupId>org.mockito</groupId> <artifactId>mockito-core</artifactId> - <version>${mockito.version}</version> </dependency> </dependencies> diff --git a/distribution/server/src/assemble/LICENSE.bin.txt b/distribution/server/src/assemble/LICENSE.bin.txt index fd9c2467bb4..1c91c137f3e 100644 --- a/distribution/server/src/assemble/LICENSE.bin.txt +++ b/distribution/server/src/assemble/LICENSE.bin.txt @@ -457,7 +457,7 @@ The Apache Software License, Version 2.0 - net.jodah-typetools-0.5.0.jar - dev.failsafe-failsafe-3.3.2.jar * Byte Buddy - - net.bytebuddy-byte-buddy-1.14.12.jar + - net.bytebuddy-byte-buddy-1.15.11.jar * zt-zip - org.zeroturnaround-zt-zip-1.17.jar * Apache Avro diff --git a/pom.xml b/pom.xml index acfb2afa5e8..b73e925fff7 100644 --- a/pom.xml +++ b/pom.xml @@ -114,6 +114,7 @@ flexible messaging model and an intuitive client API.</description> --add-opens java.management/sun.management=ALL-UNNAMED <!--JvmDefaultGCMetricsLogger & MBeanStatsGenerator--> --add-opens jdk.management/com.sun.management.internal=ALL-UNNAMED <!--MBeanStatsGenerator--> --add-opens java.base/jdk.internal.platform=ALL-UNNAMED <!--LinuxInfoUtils--> + -XX:+EnableDynamicAgentLoading <!-- byte-buddy-agent and mockito-core agent dynamic loading --> </test.additional.args> <testMaxHeapSize>1300M</testMaxHeapSize> <testReuseFork>true</testReuseFork> @@ -171,7 +172,8 @@ flexible messaging model and an intuitive client API.</description> <docker-maven.version>0.45.1</docker-maven.version> <docker.verbose>true</docker.verbose> <typetools.version>0.5.0</typetools.version> - <byte-buddy.version>1.14.12</byte-buddy.version> + <!-- match the byte-buddy version used by the mockito-core pom --> + <byte-buddy.version>1.15.11</byte-buddy.version> <zt-zip.version>1.17</zt-zip.version> <protobuf3.version>3.25.5</protobuf3.version> <protoc3.version>${protobuf3.version}</protoc3.version> @@ -277,7 +279,7 @@ flexible messaging model and an intuitive client API.</description> <restassured.version>5.4.0</restassured.version> <kerby.version>1.1.1</kerby.version> <testng.version>7.7.1</testng.version> - <mockito.version>5.6.0</mockito.version> + <mockito.version>5.17.0</mockito.version> <javassist.version>3.25.0-GA</javassist.version> <skyscreamer.version>1.5.0</skyscreamer.version> <objenesis.version>3.3</objenesis.version> <!-- should match mockito-core objenesis version --> @@ -386,8 +388,10 @@ flexible messaging model and an intuitive client API.</description> <dependency> <groupId>org.mockito</groupId> - <artifactId>mockito-core</artifactId> + <artifactId>mockito-bom</artifactId> <version>${mockito.version}</version> + <type>pom</type> + <scope>import</scope> </dependency> <dependency>