smengcl commented on code in PR #10816:
URL: https://github.com/apache/ozone/pull/10816#discussion_r3643966011


##########
pom.xml:
##########
@@ -147,7 +147,7 @@
     <maven-shade-plugin.version>3.6.2</maven-shade-plugin.version>
     <maven-site-plugin.version>3.22.0</maven-site-plugin.version>
     <maven-source-plugin.version>3.4.0</maven-source-plugin.version>
-    <maven-surefire-plugin.argLine>-Xmx8192m 
-XX:+HeapDumpOnOutOfMemoryError</maven-surefire-plugin.argLine>
+    <maven-surefire-plugin.argLine>-Xmx8192m -XX:+HeapDumpOnOutOfMemoryError 
-XX:+EnableDynamicAgentLoading</maven-surefire-plugin.argLine>

Review Comment:
   This property is inherited by every Surefire fork, but JDK 8 does not 
recognize `-XX:+EnableDynamicAgentLoading`. Running the test command from the 
PR on this head with JDK 8 fails before executing any tests (`Unrecognized VM 
option 'EnableDynamicAgentLoading'`).
   
   Ozone still documents JDK 8 support and includes it in the CI compile 
matrix. Could we enable this argument only from a JDK `[11,)` profile? 
Something like:
   
   ```diff
   diff --git a/pom.xml b/pom.xml
   index 9eb51b2f548..xxxxxxxxxxx 100644
   --- a/pom.xml
   +++ b/pom.xml
   @@ -147,8 +147,9 @@
        <maven-shade-plugin.version>3.6.2</maven-shade-plugin.version>
        <maven-site-plugin.version>3.22.0</maven-site-plugin.version>
        <maven-source-plugin.version>3.4.0</maven-source-plugin.version>
   -    <maven-surefire-plugin.argLine>-Xmx8192m 
-XX:+HeapDumpOnOutOfMemoryError 
-XX:+EnableDynamicAgentLoading</maven-surefire-plugin.argLine>
   +    <maven-surefire-plugin.argLine>-Xmx8192m 
-XX:+HeapDumpOnOutOfMemoryError 
${maven-surefire-plugin.argLineDynamicAgentLoading}</maven-surefire-plugin.argLine>
        <maven-surefire-plugin.argLineAccessArgs />
   +    <maven-surefire-plugin.argLineDynamicAgentLoading />
        <maven-surefire-plugin.version>3.5.2</maven-surefire-plugin.version>
        
<maven-surefire-report-plugin.version>${maven-surefire-plugin.version}</maven-surefire-report-plugin.version>
        
<maven.compiler.createMissingPackageInfoClass>false</maven.compiler.createMissingPackageInfoClass>
   @@ -2697,6 +2698,9 @@
          <activation>
            <jdk>[11,]</jdk>
          </activation>
   +      <properties>
   +        
<maven-surefire-plugin.argLineDynamicAgentLoading>-XX:+EnableDynamicAgentLoading</maven-surefire-plugin.argLineDynamicAgentLoading>
   +      </properties>
          <build>
            <plugins>
              <plugin>
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to