diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 56c938c..7939564 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,6 +9,13 @@ jobs: build-and-test: runs-on: ubuntu-latest + strategy: + matrix: + # PRs: JDK 8 only for fast feedback + # Push: JDK 8 + 21 to verify baseline and --add-opens flags + java: ${{ github.event_name == 'pull_request' && fromJSON('[8]') || fromJSON('[8, 21]') }} + fail-fast: false + # Increase timeout for long-running test suites #timeout-minutes: 60 @@ -18,10 +25,10 @@ jobs: with: fetch-depth: 0 - - name: Set up JDK 8 + - name: Set up JDK ${{ matrix.java }} uses: actions/setup-java@v4 with: - java-version: '8' + java-version: ${{ matrix.java }} distribution: 'temurin' cache: 'maven' @@ -56,7 +63,7 @@ jobs: if: always() uses: actions/upload-artifact@v4 with: - name: test-results + name: test-results-jdk${{ matrix.java }} path: | **/target/surefire-reports/*.xml **/target/surefire-reports/*.txt @@ -68,7 +75,7 @@ jobs: if: failure() uses: actions/upload-artifact@v4 with: - name: test-logs + name: test-logs-jdk${{ matrix.java }} path: | **/target/surefire-reports/*.txt **/target/failsafe-reports/*.txt @@ -82,7 +89,7 @@ jobs: NODE_OPTIONS: '--max-old-space-size=12288' with: report_paths: '**/target/*-reports/TEST-*.xml' - check_name: Test Results + check_name: Test Results (JDK ${{ matrix.java }}) fail_on_failure: true require_tests: true @@ -90,7 +97,7 @@ jobs: if: success() uses: actions/upload-artifact@v4 with: - name: build-artifacts + name: build-artifacts-jdk${{ matrix.java }} path: | phoenix-ddb-assembly/target/*.tar.gz retention-days: 5 diff --git a/phoenix-ddb-rest/src/test/java/org/apache/phoenix/ddb/MiscIT.java b/phoenix-ddb-rest/src/test/java/org/apache/phoenix/ddb/MiscIT.java index 8b65381..67d20f5 100644 --- a/phoenix-ddb-rest/src/test/java/org/apache/phoenix/ddb/MiscIT.java +++ b/phoenix-ddb-rest/src/test/java/org/apache/phoenix/ddb/MiscIT.java @@ -126,7 +126,7 @@ public void testMixWorkflows2() throws Exception { phoenixDBStreamsClientV2); } - @Test(timeout = 600000) + @Test(timeout = 900000) public void testMixWorkflows4() throws Exception { Misc1Util.test3(dynamoDbClient, phoenixDBClientV2, dynamoDbStreamsClient, phoenixDBStreamsClientV2); diff --git a/pom.xml b/pom.xml index d6b4315..61a2537 100644 --- a/pom.xml +++ b/pom.xml @@ -41,7 +41,9 @@ UTF-8 - 1.8 + 1.8 + ${compileSource} + ${compileSource} 2.30.22 5.3.2 4.13.1 @@ -59,6 +61,44 @@ 1 3.0.0-M6 4.9.3 + + + 2200m + 1000m + + -enableassertions -Xmx${surefire.Xmx} -Xms${surefire.Xms} + -Djava.security.egd=file:/dev/./urandom -Djava.net.preferIPv4Stack=true + -Djava.awt.headless=true -Djdk.net.URLClassPath.disableClassPathURLCheck=true + -Dorg.apache.hbase.thirdparty.io.netty.leakDetection.level=advanced + -Dio.netty.eventLoopThreads=3 -Duser.timezone="America/Los_Angeles" + -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=./target/ + "-Djava.library.path=${hadoop.library.path}${path.separator}${java.library.path}" + + + -XX:NewRatio=4 -XX:SurvivorRatio=8 -XX:+UseCompressedOops -XX:+UseConcMarkSweepGC + -XX:+DisableExplicitGC -XX:+UseCMSInitiatingOccupancyOnly -XX:+CMSClassUnloadingEnabled + -XX:+CMSScavengeBeforeRemark -XX:CMSInitiatingOccupancyFraction=68 + + -Dorg.apache.hbase.thirdparty.io.netty.tryReflectionSetAccessible=true + --add-modules jdk.unsupported + --add-opens java.base/java.nio=ALL-UNNAMED + --add-opens java.base/sun.nio.ch=ALL-UNNAMED + --add-opens java.base/java.lang=ALL-UNNAMED + --add-opens java.base/jdk.internal.ref=ALL-UNNAMED + --add-opens java.base/java.lang.reflect=ALL-UNNAMED + --add-opens java.base/java.util=ALL-UNNAMED + --add-opens java.base/java.util.concurrent=ALL-UNNAMED + --add-exports java.base/jdk.internal.misc=ALL-UNNAMED + --add-exports java.security.jgss/sun.security.krb5=ALL-UNNAMED + + --add-opens java.base/jdk.internal.util.random=ALL-UNNAMED + + + -Djava.security.manager=allow + + ${phoenix-surefire.argLine} ${phoenix-surefire.jdk8.tuning.flags} @{jacocoArgLine} + + @@ -68,10 +108,6 @@ org.apache.maven.plugins maven-compiler-plugin 3.8.1 - - ${java.version} - ${java.version} - org.apache.maven.plugins @@ -134,12 +170,61 @@ prepare-agent + + jacocoArgLine + + + build-with-jdk8 + + [1.8,11) + + + + + build-with-jdk11 + + [11,17) + + + ${phoenix-surefire.jdk11.flags} + ${phoenix-surefire.jdk11.tuning.flags} + ${phoenix-surefire.argLine} + @{jacocoArgLine} + + + + build-with-jdk17 + + [17,21) + + + ${phoenix-surefire.jdk11.flags} + ${phoenix-surefire.jdk17.flags} + ${phoenix-surefire.jdk17.tuning.flags} + ${phoenix-surefire.argLine} + @{jacocoArgLine} + + + + build-with-jdk21 + + [21,) + + + ${phoenix-surefire.jdk11.flags} + ${phoenix-surefire.jdk17.flags} + ${phoenix-surefire.jdk21.flags} + ${phoenix-surefire.jdk17.tuning.flags} + ${phoenix-surefire.argLine} + @{jacocoArgLine} + +