Skip to content

Commit

Permalink
Run tests with JDK 22
Browse files Browse the repository at this point in the history
  • Loading branch information
wendigo committed Mar 21, 2024
1 parent c01f45b commit 31bbbf0
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: "Verify checked out commits and setup Java"
inputs:
java-version:
description: "Java version to setup"
default: 21
default: 22
cache:
description: "Cache Maven repo (true/false/restore)"
default: restore
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ jobs:
fail-fast: false
matrix:
include:
- { java-version: 21, cache: 'true', cleanup-node: 'false' }
- { java-version: 22, cache: 'restore', cleanup-node: 'true' }
- { java-version: 22, cache: 'true', cleanup-node: 'false' }
timeout-minutes: 45
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -121,8 +120,6 @@ jobs:
platforms: arm64,ppc64le
- name: Build and Test Docker Image
run: core/docker/build.sh
- name: Build and Test AMD64 Docker Image with JDK 22
run: core/docker/build.sh -j 22 -a amd64

check-commits-dispatcher:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -521,7 +518,7 @@ jobs:
with:
cache: restore
cleanup-node: ${{ format('{0}', matrix.modules == 'plugin/trino-singlestore') }}
java-version: ${{ matrix.jdk != '' && matrix.jdk || '21' }}
java-version: ${{ matrix.jdk != '' && matrix.jdk || '22' }}
- name: Maven Install
run: |
export MAVEN_OPTS="${MAVEN_INSTALL_OPTS}"
Expand Down
4 changes: 4 additions & 0 deletions core/trino-server-rpm/src/main/rpm/preinstall
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,13 @@ if ! check_if_correct_java_version "$JAVA_HOME"; then
java_found=false
for candidate in \
/usr/lib/jvm/java-21-* \
/usr/lib/jvm/java-22-* \
/usr/lib/jvm/zulu-21 \
/usr/lib/jvm/zulu-22 \
/usr/lib/jvm/temurin-21 \
/usr/lib/jvm/temurin-21-* \
/usr/lib/jvm/temurin-22 \
/usr/lib/jvm/temurin-22-* \
/usr/lib/jvm/default-java \
/usr/java/default \
/ \
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ public void testInstallUninstall()
// Release names as in the https://api.adoptium.net/q/swagger-ui/#/Release%20Info/getReleaseNames
testInstall("jdk-21.0.2+13", "/usr/lib/jvm/temurin-21", "21");
testUninstall("jdk-21.0.2+13", "/usr/lib/jvm/temurin-21", "21");

testInstall("jdk-22+36", "/usr/lib/jvm/temurin-22", "22");
testUninstall("jdk-22+36", "/usr/lib/jvm/temurin-22", "22");
}

private void testInstall(String temurinReleaseName, String javaHome, String expectedJavaVersion)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public final class EnvironmentOptions
public String launcherBin;

@Option(names = "--trino-jdk-version", paramLabel = "<trino-jdk-version>", description = "JDK to use for running Trino " + DEFAULT_VALUE)
public String jdkProvider = "temurin21";
public String jdkProvider = "temurin22";

@Option(names = "--jdk-tmp-download-path", paramLabel = "<jdk-tmp-download-path>", defaultValue = "${env:PTL_TMP_DOWNLOAD_PATH:-${sys:java.io.tmpdir}/ptl-tmp-download}", description = "Path to use to download JDK distributions " + DEFAULT_VALUE)
@Nullable
Expand Down

0 comments on commit 31bbbf0

Please sign in to comment.