Skip to content

Commit bd0e995

Browse files
authored
build: add JUnit 5.12 and GraalVM for JDK 24 support
Tests should run on LTS and latest release versions
1 parent dbccbc5 commit bd0e995

File tree

3 files changed

+57
-3
lines changed

3 files changed

+57
-3
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
strategy:
7474
matrix:
7575
os: [ ubuntu-latest, windows-latest, macos-latest ]
76-
java: [ '17', '21', '22' ]
76+
java: [ '17', '21', '24' ]
7777
profiles: ['native', 'native,native-exported']
7878
runs-on: ${{ matrix.os }}
7979
steps:

pom.xml

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
<properties>
1313
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
14-
<junit.version>5.11.4</junit.version>
14+
<junit.version>5.12.1</junit.version>
1515
<surefire.version>3.5.2</surefire.version>
1616
<archunit.version>1.4.0</archunit.version>
1717
<graalvm.version>24.1.2</graalvm.version>
@@ -355,6 +355,15 @@
355355
<buildArgs>
356356
<!-- required to allow junit-pioneer to compile with strict image heap enabled -->
357357
<arg>--initialize-at-build-time=org.junitpioneer.jupiter.issue.IssueExtensionExecutionListener</arg>
358+
<!--
359+
Issues with JUnit support should be largely resolved by https://github.com/graalvm/native-build-tools/issues/613
360+
These are only necessary for GraalVM for JDK 22+ as this has the Strict Image Heap enabled by default,
361+
and should be removed when aforementioned issue is released in a new buildtools release.
362+
-->
363+
<arg>--initialize-at-build-time=org.junit.jupiter.engine.descriptor.ExclusiveResourceCollector$DefaultExclusiveResourceCollector</arg>
364+
<arg>--initialize-at-build-time=org.junit.jupiter.api.parallel.ResourceLock</arg>
365+
<arg>--initialize-at-build-time=org.junit.jupiter.api.parallel.ResourceLockTarget</arg>
366+
<arg>--initialize-at-build-time=org.junit.jupiter.api.parallel.ResourceAccessMode</arg>
358367
</buildArgs>
359368
</configuration>
360369
</plugin>
@@ -431,7 +440,6 @@
431440
<dependency>
432441
<groupId>org.junit.jupiter</groupId>
433442
<artifactId>junit-jupiter</artifactId>
434-
<version>${junit.version}</version>
435443
<scope>test</scope>
436444
</dependency>
437445
<dependency>
@@ -476,4 +484,15 @@
476484
<scope>test</scope>
477485
</dependency>
478486
</dependencies>
487+
<dependencyManagement>
488+
<dependencies>
489+
<dependency>
490+
<groupId>org.junit</groupId>
491+
<artifactId>junit-bom</artifactId>
492+
<version>${junit.version}</version>
493+
<type>pom</type>
494+
<scope>import</scope>
495+
</dependency>
496+
</dependencies>
497+
</dependencyManagement>
479498
</project>
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
"comment": "New reachability metadata format introduced in GraalVM for JDK 23, this merges the other *-config.json files into one: https://www.graalvm.org/latest/reference-manual/native-image/metadata/",
3+
"resources": [
4+
{
5+
"glob": "org/sqlite/*.jar"
6+
},
7+
{
8+
"glob": "org/sqlite/*.db"
9+
},
10+
{
11+
"module": "java.sql.rowset",
12+
"glob": "javax/sql/rowset/rowset.properties"
13+
}
14+
],
15+
"bundles": [
16+
{
17+
"name": "com.sun.rowset.RowSetResourceBundle"
18+
}
19+
],
20+
"reflection": [
21+
{
22+
"type": "com.sun.rowset.providers.RIOptimisticProvider",
23+
"methods": [
24+
{
25+
"name": "<init>",
26+
"parameterTypes": []
27+
}
28+
]
29+
},
30+
{
31+
"type": "java.sql.Types",
32+
"allPublicFields": true
33+
}
34+
]
35+
}

0 commit comments

Comments
 (0)