MCPcopy Create free account
hub / github.com/apache/fory / run_jdk17_plus

Function run_jdk17_plus

ci/tasks/java.py:247–272  ·  view source on GitHub ↗

Run Java 17+ tests.

(java_version="17")

Source from the content-addressed store, hash-verified

245
246
247def 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
275def run_windows_java21():

Callers 1

runFunction · 0.85

Calls 5

jdk25_runtime_optionsFunction · 0.85
jdk25_javac_optionsFunction · 0.85
extendMethod · 0.80
infoMethod · 0.65
popMethod · 0.45

Tested by

no test coverage detected