JVM Args Tests¶
Covers JVM argument construction for the embedded runtime.
What's Covered¶
- Defaults when no explicit JVM args are provided.
- Merging the
ARCADEDB_JVM_ARGSenvironment variable while preserving mandatory flags:-Djava.awt.headless=true--add-modules=jdk.incubator.vector--enable-native-access=ALL-UNNAMED-Dfile.encoding=UTF8-Dpolyglot.engine.WarnInterpreterOnly=false-XX:+UseCompactObjectHeaders- the
--add-opensflags, checked by package:java.base/java.util.concurrent.atomic,java.base/java.nio.channels.spi, andjava.base/java.lang
- A default JVM crash log when no error file is set (an argument containing
hs_err_pid). - Keeping the maximum value when multiple
-Xmxflags are supplied. - Ensuring a default heap (
-Xmx4g) is injected if the user omits it. - Respecting the user's explicit choice and avoiding duplicate flags when they already provide them.
ARCADEDB_JVM_ERROR_FILEhandling via-XX:ErrorFile=....common_pool_parallelism: injecting-Djava.util.concurrent.ForkJoinPool.common.parallelism=<n>, overriding any env-provided value, and rejecting values below 1.conftest.pydefines eachpytest_*hook once (counted from its AST).- The conftest hook turns faulthandler off on Windows only: the test runs the hook for
win32,linux, anddarwinon every platform, and on Windows it also checks the session's real state. conftest.dump_java_threads()lists the JVM's threads with their states and stacks; the conftest timer calls it for a test still running afterARCADEDB_TEST_JAVA_DUMP_AFTER_Sseconds (540 by default), so a hang inside a Java call leaves the Java side in the CI log (humemai/arcadedb-embedded-python#10).