Skip to content

Commit 5a805b3

Browse files
committed
fix: mockito and OpenJDK warning when running tests
Getting warning: Mockito is currently self-attaching to enable the inline-mock-maker. This will no longer work in future releases of the JDK. Please add Mockito as an agent to your build as described in Mockito's documentation: https://javadoc.io/doc/org.mockito/mockito-core/latest/org.mockito/org/mockito/Mockito.html#0.3 WARNING: A Java agent has been loaded dynamically (/Users/attila/.m2/repository/net/bytebuddy/byte-buddy-agent/1.17.7/byte-buddy-agent-1.17.7.jar) WARNING: If a serviceability tool is in use, please run with -XX:+EnableDynamicAgentLoading to hide this warning WARNING: If a serviceability tool is not in use, please run with -Djdk.instrument.traceUsage for more information WARNING: Dynamic loading of agents will be disallowed by default in a future release OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader classes because bootstrap classpath has been appended Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
1 parent b7e5f4f commit 5a805b3

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@
277277
<version>${maven-surefire-plugin.version}</version>
278278
<!-- Summary output for tests at the end -->
279279
<configuration>
280+
<argLine>-javaagent:${settings.localRepository}/org/mockito/mockito-core/${mokito.version}/mockito-core-${mokito.version}.jar -Xshare:off</argLine>
280281
<reportFormat>plain</reportFormat>
281282
<consoleOutputReporter>
282283
<disable>true</disable>

0 commit comments

Comments
 (0)