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

Function run_integration_tests

ci/tasks/java.py:294–352  ·  view source on GitHub ↗

Run Java integration tests.

()

Source from the content-addressed store, hash-verified

292
293
294def run_integration_tests():
295 """Run Java integration tests."""
296 logging.info("Install JDKs")
297 install_jdks()
298
299 logging.info("Executing fory integration tests")
300
301 install_jdk25_fory_artifacts()
302
303 logging.info("benchmark tests")
304 common.cd_project_subdir("benchmarks/java")
305 common.exec_cmd("mvn -T10 -B --no-transfer-progress clean test install -Pjmh")
306
307 logging.info("Start JPMS tests")
308 common.cd_project_subdir("integration_tests/jpms_tests")
309 common.exec_cmd("mvn -T10 -B --no-transfer-progress clean test")
310
311 logging.info("Start jdk compatibility tests")
312 common.cd_project_subdir("integration_tests/jdk_compatibility_tests")
313 common.exec_cmd("mvn -T10 -B --no-transfer-progress clean test")
314
315 # Run tests with different JDK versions
316 # This is a two-phase process:
317 # 1. First round: Generate serialized data files for each JDK version
318 # 2. Second round: Test if these files can be deserialized correctly by each JDK version
319
320 # First round: Generate serialized data files
321 logging.info("First round: Generate serialized data files for each JDK version")
322 for java_version, jdk in JDKS.items():
323 if int(java_version) >= 25:
324 logging.info(
325 "Skipping classpath JDK compatibility data generation for "
326 f"JDK{java_version}; JDK25+ zero-Unsafe coverage runs on JPMS"
327 )
328 continue
329 use_jdk(java_version)
330
331 logging.info(f"Generating data with JDK: {jdk}")
332 common.exec_cmd(
333 "mvn -T10 --no-transfer-progress clean test -Dtest=org.apache.fory.integration_tests.JDKCompatibilityTest"
334 )
335
336 # Second round: Test cross-JDK compatibility
337 logging.info("Second round: Test cross-JDK compatibility")
338 for java_version, jdk in JDKS.items():
339 if int(java_version) >= 25:
340 logging.info(
341 "Skipping classpath JDK compatibility verification for "
342 f"JDK{java_version}; JDK25+ zero-Unsafe coverage runs on JPMS"
343 )
344 continue
345 use_jdk(java_version)
346
347 logging.info(f"Testing compatibility with JDK: {jdk}")
348 common.exec_cmd(
349 "mvn -T10 --no-transfer-progress clean test -Dtest=org.apache.fory.integration_tests.JDKCompatibilityTest"
350 )
351

Callers 1

runFunction · 0.85

Calls 5

install_jdksFunction · 0.85
use_jdkFunction · 0.85
itemsMethod · 0.80
infoMethod · 0.65

Tested by

no test coverage detected