This is an automated email from the ASF dual-hosted git repository.

mmerli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git


The following commit(s) were added to refs/heads/master by this push:
     new b989fbcda Allow running units test on jdk17 (#3195)
b989fbcda is described below

commit b989fbcdae74db6e26a815af605634747f431fb9
Author: ZhangJian He <[email protected]>
AuthorDate: Mon Apr 11 09:03:22 2022 +0800

    Allow running units test on jdk17 (#3195)
    
    * Allow running units test on jdk17
    
    * Allow running units test on jdk17
---
 pom.xml                                     | 16 +++++++++++++++-
 stream/distributedlog/common/pom.xml        |  2 +-
 stream/distributedlog/core/pom.xml          |  2 +-
 stream/distributedlog/pom.xml               |  2 +-
 stream/pom.xml                              |  2 +-
 tests/integration-tests-base-groovy/pom.xml |  2 +-
 6 files changed, 20 insertions(+), 6 deletions(-)

diff --git a/pom.xml b/pom.xml
index dd9cb22b0..b20224670 100644
--- a/pom.xml
+++ b/pom.xml
@@ -112,6 +112,7 @@
     <javac.target>1.8</javac.target>
     <redirectTestOutputToFile>true</redirectTestOutputToFile>
     <testRetryCount>2</testRetryCount>
+    <test.additional.args/>
 
     <!-- dependencies -->
     <arquillian-cube.version>1.18.2</arquillian-cube.version>
@@ -907,7 +908,7 @@
         <artifactId>maven-surefire-plugin</artifactId>
         <version>${maven-surefire-plugin.version}</version>
         <configuration>
-          <argLine>-Xmx2G -Djava.net.preferIPv4Stack=true 
-Dio.netty.leakDetection.level=paranoid</argLine>
+          <argLine>-Xmx2G -Djava.net.preferIPv4Stack=true 
-Dio.netty.leakDetection.level=paranoid ${test.additional.args}</argLine>
           
<redirectTestOutputToFile>${redirectTestOutputToFile}</redirectTestOutputToFile>
           <forkCount>${forkCount.variable}</forkCount>
           <reuseForks>false</reuseForks>
@@ -1211,6 +1212,19 @@
         <nar.aolProperties>src/apple_m1_aol.properties</nar.aolProperties>
       </properties>
     </profile>
+    <profile>
+      <id>jdk11</id>
+      <activation>
+        <jdk>[11,)</jdk>
+      </activation>
+      <properties>
+        <test.additional.args>
+          --add-opens java.base/jdk.internal.loader=ALL-UNNAMED
+          --add-opens java.base/java.lang=ALL-UNNAMED
+          --add-opens java.base/java.io=ALL-UNNAMED
+        </test.additional.args>
+      </properties>
+    </profile>
     <profile>
       <id>apache-release</id>
       <build>
diff --git a/stream/distributedlog/common/pom.xml 
b/stream/distributedlog/common/pom.xml
index abf09b9cb..8c6d4febf 100644
--- a/stream/distributedlog/common/pom.xml
+++ b/stream/distributedlog/common/pom.xml
@@ -99,7 +99,7 @@
         <version>${maven-surefire-plugin.version}</version>
         <configuration>
           
<redirectTestOutputToFile>${redirectTestOutputToFile}</redirectTestOutputToFile>
-          <argLine>-Xmx3G -Djava.net.preferIPv4Stack=true 
-XX:MaxDirectMemorySize=2G</argLine>
+          <argLine>-Xmx3G -Djava.net.preferIPv4Stack=true 
-XX:MaxDirectMemorySize=2G ${test.additional.args}</argLine>
           <forkMode>always</forkMode>
           <forkedProcessTimeoutInSeconds>1800</forkedProcessTimeoutInSeconds>
         </configuration>
diff --git a/stream/distributedlog/core/pom.xml 
b/stream/distributedlog/core/pom.xml
index bef0e4c1c..67ef4b422 100644
--- a/stream/distributedlog/core/pom.xml
+++ b/stream/distributedlog/core/pom.xml
@@ -106,7 +106,7 @@
         <configuration>
           <trimStackTrace>false</trimStackTrace>
           
<redirectTestOutputToFile>${redirectTestOutputToFile}</redirectTestOutputToFile>
-          <argLine>-Xmx3G -Djava.net.preferIPv4Stack=true 
-XX:MaxDirectMemorySize=2G</argLine>
+          <argLine>-Xmx3G -Djava.net.preferIPv4Stack=true 
-XX:MaxDirectMemorySize=2G ${test.additional.args}</argLine>
           <forkMode>always</forkMode>
           <forkedProcessTimeoutInSeconds>1800</forkedProcessTimeoutInSeconds>
           <properties>
diff --git a/stream/distributedlog/pom.xml b/stream/distributedlog/pom.xml
index 01385778f..25bcd66dd 100644
--- a/stream/distributedlog/pom.xml
+++ b/stream/distributedlog/pom.xml
@@ -73,7 +73,7 @@
         <version>${maven-surefire-plugin.version}</version>
         <configuration>
           
<redirectTestOutputToFile>${redirectTestOutputToFile}</redirectTestOutputToFile>
-          <argLine>-Xmx3G -Djava.net.preferIPv4Stack=true 
-XX:MaxDirectMemorySize=2G -Dio.netty.leakDetection.level=PARANOID</argLine>
+          <argLine>-Xmx3G -Djava.net.preferIPv4Stack=true 
-XX:MaxDirectMemorySize=2G -Dio.netty.leakDetection.level=PARANOID 
${test.additional.args}</argLine>
           <forkMode>always</forkMode>
           <forkedProcessTimeoutInSeconds>1800</forkedProcessTimeoutInSeconds>
         </configuration>
diff --git a/stream/pom.xml b/stream/pom.xml
index ed863740b..f311ed213 100644
--- a/stream/pom.xml
+++ b/stream/pom.xml
@@ -58,7 +58,7 @@
           <!-- only run tests when -DstreamTests is specified //-->
           <skipTests>true</skipTests>
           
<redirectTestOutputToFile>${redirectTestOutputToFile}</redirectTestOutputToFile>
-          <argLine>-Xmx3G -Djava.net.preferIPv4Stack=true 
-XX:MaxDirectMemorySize=2G -Dio.netty.leakDetection.level=PARANOID</argLine>
+          <argLine>-Xmx3G -Djava.net.preferIPv4Stack=true 
-XX:MaxDirectMemorySize=2G -Dio.netty.leakDetection.level=PARANOID 
${test.additional.args}</argLine>
           <forkMode>always</forkMode>
           <forkedProcessTimeoutInSeconds>1800</forkedProcessTimeoutInSeconds>
         </configuration>
diff --git a/tests/integration-tests-base-groovy/pom.xml 
b/tests/integration-tests-base-groovy/pom.xml
index 97209f3d9..1f2d737df 100644
--- a/tests/integration-tests-base-groovy/pom.xml
+++ b/tests/integration-tests-base-groovy/pom.xml
@@ -85,7 +85,7 @@
              https://issues.apache.org/jira/browse/SUREFIRE-1476 //-->
         <version>2.8.1</version>
         <configuration>
-          <argLine>-Xmx4G -Djava.net.preferIPv4Stack=true</argLine>
+          <argLine>-Xmx4G -Djava.net.preferIPv4Stack=true 
${test.additional.args}</argLine>
           <forkCount>1</forkCount>
           <useSystemClassLoader>false</useSystemClassLoader>
           <systemPropertyVariables>

Reply via email to