Skip to content

Commit 4c454f4

Browse files
garethgeorgeKenneth Rosario
andauthored
chore: add test coverage for Java 21 (#227)
* chore: add test coverage for Java 21 * allowlist api.adoptium.net:443 --------- Co-authored-by: Kenneth Rosario <[email protected]>
1 parent 0f35dea commit 4c454f4

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

.github/workflows/buildpack-integration-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@ jobs:
3535
prerun: 'invoker/conformance/prerun.sh'
3636
builder-runtime: 'java17'
3737
builder-runtime-version: '17'
38-
builder-url: gcr.io/gae-runtimes/buildpacks/google-gae-22/java/builder:latest
38+
builder-url: gcr.io/gae-runtimes/buildpacks/google-gae-22/java/builder:latest

.github/workflows/conformance.yaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,7 @@ jobs:
1414
strategy:
1515
matrix:
1616
java: [
17-
11.x
18-
# 12.x,
19-
# 13.x
17+
11.x,
2018
]
2119
steps:
2220
- name: Harden Runner

.github/workflows/unit.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ jobs:
1414
matrix:
1515
java: [
1616
11.x,
17-
17.x
17+
17.x,
18+
21-ea
1819
]
1920
steps:
2021
- name: Harden Runner
@@ -25,6 +26,8 @@ jobs:
2526
allowed-endpoints: >
2627
github.com:443
2728
repo.maven.apache.org:443
29+
api.adoptium.net:443
30+
*.githubusercontent.com:443
2831
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
2932
- name: Set up JDK ${{ matrix.java }}
3033
uses: actions/setup-java@0ab4596768b603586c0de567f2430c30f5b0d2b0 # v3.13.0

invoker/core/src/test/java/com/google/cloud/functions/invoker/IntegrationTest.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -363,6 +363,10 @@ private static int getJavaVersion() {
363363
if (dot != -1) {
364364
version = version.substring(0, dot);
365365
}
366+
int dash = version.indexOf("-");
367+
if (dash != -1) {
368+
version = version.substring(0, dash);
369+
}
366370
}
367371
return Integer.parseInt(version);
368372
}

0 commit comments

Comments
 (0)