Run Java 17+ tests.
(java_version="17")
| 245 | |
| 246 | |
| 247 | def run_jdk17_plus(java_version="17"): |
| 248 | """Run Java 17+ tests.""" |
| 249 | logging.info(f"Executing fory java tests with Java {java_version}") |
| 250 | common.exec_cmd("java -version") |
| 251 | jdk_options = [ |
| 252 | "--add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED" |
| 253 | ] |
| 254 | if int(java_version) >= 25: |
| 255 | jdk_options.extend(jdk25_runtime_options("ALL-UNNAMED")) |
| 256 | jdk_options.extend(jdk25_javac_options()) |
| 257 | os.environ["JDK_JAVA_OPTIONS"] = " ".join(jdk_options) |
| 258 | |
| 259 | common.cd_project_subdir("java") |
| 260 | if int(java_version) >= 25: |
| 261 | # The JDK25+ profile overlays Surefire's classpath with Java25 replacement |
| 262 | # classes while keeping the test run unnamed. Keep JPMS coverage below as a |
| 263 | # separate named-module check. |
| 264 | common.exec_cmd("mvn -T10 --batch-mode --no-transfer-progress clean install") |
| 265 | os.environ.pop("JDK_JAVA_OPTIONS", None) |
| 266 | logging.info(f"Executing JDK{java_version} JPMS tests") |
| 267 | common.cd_project_subdir("integration_tests/jpms_tests") |
| 268 | common.exec_cmd("mvn -T10 --batch-mode --no-transfer-progress clean test") |
| 269 | else: |
| 270 | common.exec_cmd("mvn -T10 --batch-mode --no-transfer-progress install") |
| 271 | |
| 272 | logging.info("Executing fory java tests succeeds") |
| 273 | |
| 274 | |
| 275 | def run_windows_java21(): |
no test coverage detected