This is an automated email from the ASF dual-hosted git repository.
dongjoon pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/orc.git
The following commit(s) were added to refs/heads/main by this push:
new 3b8a35b5a ORC-1910: Add `-XX:+EnableDynamicAgentLoading` to Surefire
argLine
3b8a35b5a is described below
commit 3b8a35b5aafda386a6d5139de1040bae28f9216c
Author: Dongjoon Hyun <[email protected]>
AuthorDate: Sun Jun 8 19:34:48 2025 -0700
ORC-1910: Add `-XX:+EnableDynamicAgentLoading` to Surefire argLine
### What changes were proposed in this pull request?
This PR aims to add `-XX:+EnableDynamicAgentLoading` to Surefire argLine.
### Why are the changes needed?
To suppress the following during testing.
```
WARNING: A Java agent has been loaded dynamically
(/Users/dongjoon/.m2/repository/net/bytebuddy/byte-buddy-agent/1.17.5/byte-buddy-agent-1.17.5.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
```
### How was this patch tested?
Manual tests.
**BEFORE**
```
$ mvn package --pl core -Dtest=TestOrcLargeStripe
...
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.apache.orc.impl.TestOrcLargeStripe
WARNING: A Java agent has been loaded dynamically
(/Users/dongjoon/.m2/repository/net/bytebuddy/byte-buddy-agent/1.17.5/byte-buddy-agent-1.17.5.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
```
**AFTER**
```
$ mvn package --pl core -Dtest=TestOrcLargeStripe
...
[INFO] -------------------------------------------------------
[INFO] T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.apache.orc.impl.TestOrcLargeStripe
OpenJDK 64-Bit Server VM warning: Sharing is only supported for boot loader
classes because bootstrap classpath has been appended
```
### Was this patch authored or co-authored using generative AI tooling?
No.
Closes #2258 from dongjoon-hyun/ORC-1910.
Authored-by: Dongjoon Hyun <[email protected]>
Signed-off-by: Dongjoon Hyun <[email protected]>
---
java/pom.xml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/java/pom.xml b/java/pom.xml
index b7086f85c..a82d344a3 100644
--- a/java/pom.xml
+++ b/java/pom.xml
@@ -711,7 +711,7 @@
<configuration>
<trimStackTrace>false</trimStackTrace>
<reuseForks>false</reuseForks>
- <argLine>-Xmx2048m -XX:+IgnoreUnrecognizedVMOptions
--add-opens=java.base/java.nio=ALL-UNNAMED
--add-opens=java.security.jgss/sun.security.krb5=ALL-UNNAMED
--enable-native-access=ALL-UNNAMED</argLine>
+ <argLine>-Xmx2048m -XX:+IgnoreUnrecognizedVMOptions
--add-opens=java.base/java.nio=ALL-UNNAMED
--add-opens=java.security.jgss/sun.security.krb5=ALL-UNNAMED
--enable-native-access=ALL-UNNAMED -XX:+EnableDynamicAgentLoading</argLine>
<environmentVariables>
<TZ>US/Pacific</TZ>
<LANG>en_US.UTF-8</LANG>