Maxim Kovalenko created SUREFIRE-2287:
-----------------------------------------

             Summary: Dynamic agent loading feature
                 Key: SUREFIRE-2287
                 URL: https://issues.apache.org/jira/browse/SUREFIRE-2287
             Project: Maven Surefire
          Issue Type: New Feature
    Affects Versions: 3.5.2
            Reporter: Maxim Kovalenko


According to [JEP 451|https://openjdk.org/jeps/451] in JDK 21, the dynamic 
loading of agents is allowed but {*}the JVM issues a warning when it occurs{*}:
{code:java}
WARNING: A {Java,JVM TI} agent has been loaded dynamically 
(file:/u/bob/agent.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 {code}
In some future Java releases, the dynamic loading of agents will be disallowed 
by default.

Please add the "{_}agent{_}" ("{_}javaagent{_}" or "{_}dynamicAgent{_}") 
parameter to the 
_configuration_ definition that will be translated to _-javaagent_ option 
during tests execution.
 
See more details here: * [https://openjdk.org/jeps/451]
 * 
https://javadoc.io/doc/org.mockito/mockito-core/latest/org/mockito/Mockito.html#0.3
 * [https://github.com/mockito/mockito/issues/3037]
 * 
https://javadoc.io/doc/net.bytebuddy/byte-buddy-agent/1.10.4/net/bytebuddy/agent/ByteBuddyAgent.html



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to