Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 13 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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'

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -82,15 +89,15 @@ 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

- name: Upload Build Artifacts
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
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
95 changes: 90 additions & 5 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<java.version>1.8</java.version>
<compileSource>1.8</compileSource>
<maven.compiler.source>${compileSource}</maven.compiler.source>
<maven.compiler.target>${compileSource}</maven.compiler.target>
<aws.sdk.version>2.30.22</aws.sdk.version>
<phoenix.version>5.3.2</phoenix.version>
<junit.version>4.13.1</junit.version>
Expand All @@ -59,6 +61,44 @@
<numForkedIT>1</numForkedIT>
<surefire.version>3.0.0-M6</surefire.version>
<antlr4.version>4.9.3</antlr4.version>

<!-- JVM version dependent JVM options for running tests. Keep mostly in sync with HBase/Phoenix -->
<surefire.Xmx>2200m</surefire.Xmx>
<surefire.Xms>1000m</surefire.Xms>

<phoenix-surefire.argLine>-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}"
</phoenix-surefire.argLine>
<phoenix-surefire.jdk8.tuning.flags>
-XX:NewRatio=4 -XX:SurvivorRatio=8 -XX:+UseCompressedOops -XX:+UseConcMarkSweepGC
-XX:+DisableExplicitGC -XX:+UseCMSInitiatingOccupancyOnly -XX:+CMSClassUnloadingEnabled
-XX:+CMSScavengeBeforeRemark -XX:CMSInitiatingOccupancyFraction=68
</phoenix-surefire.jdk8.tuning.flags>
<phoenix-surefire.jdk11.flags>-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</phoenix-surefire.jdk11.flags>
<phoenix-surefire.jdk11.tuning.flags/>
<phoenix-surefire.jdk17.flags>--add-opens java.base/jdk.internal.util.random=ALL-UNNAMED</phoenix-surefire.jdk17.flags>
<phoenix-surefire.jdk17.tuning.flags></phoenix-surefire.jdk17.tuning.flags>
<!-- Needed for SystemExitRule compatibility (not currently used) -->
<phoenix-surefire.jdk21.flags>-Djava.security.manager=allow</phoenix-surefire.jdk21.flags>
<!-- Surefire argLine defaults for Linux + JDK8 -->
<argLine>${phoenix-surefire.argLine} ${phoenix-surefire.jdk8.tuning.flags} @{jacocoArgLine}</argLine>
<!-- Empty argument when code coverage is deactivated -->
<jacocoArgLine/>
</properties>

<build>
Expand All @@ -68,10 +108,6 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down Expand Up @@ -134,12 +170,61 @@
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<propertyName>jacocoArgLine</propertyName>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>build-with-jdk8</id>
<activation>
<jdk>[1.8,11)</jdk>
</activation>
</profile>
<!-- See PHOENIX-7901 for Java 11+ support -->
<profile>
<id>build-with-jdk11</id>
<activation>
<jdk>[11,17)</jdk>
</activation>
<properties>
<argLine>${phoenix-surefire.jdk11.flags}
${phoenix-surefire.jdk11.tuning.flags}
${phoenix-surefire.argLine}
@{jacocoArgLine}</argLine>
</properties>
</profile>
<profile>
<id>build-with-jdk17</id>
<activation>
<jdk>[17,21)</jdk>
</activation>
<properties>
<argLine>${phoenix-surefire.jdk11.flags}
${phoenix-surefire.jdk17.flags}
${phoenix-surefire.jdk17.tuning.flags}
${phoenix-surefire.argLine}
@{jacocoArgLine}</argLine>
</properties>
</profile>
<profile>
<id>build-with-jdk21</id>
<activation>
<jdk>[21,)</jdk>
</activation>
<properties>
<argLine>${phoenix-surefire.jdk11.flags}
${phoenix-surefire.jdk17.flags}
${phoenix-surefire.jdk21.flags}
${phoenix-surefire.jdk17.tuning.flags}
${phoenix-surefire.argLine}
@{jacocoArgLine}</argLine>
</properties>
</profile>
</profiles>

<dependencyManagement>
Expand Down
Loading