It looks like poly test does not respect :jvm-opts in deps.edn:
poly 0.2.19 (2024-02-16)
:jvm-opts [
; Required for in-memory XTDB
"--add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED"]
Testing streamcraft.persistence-xtdb.core-test
java.lang.RuntimeException: Failed to initialize MemoryUtil. You must start Java with `--add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED` (See )
at org.apache.arrow.memory.util.MemoryUtil.(MemoryUtil.java:149)
at org.apache.arrow.memory.ArrowBuf.setZero(ArrowBuf.java:1176)
at org.apache.arrow.vector.BaseVariableWidthVector.reallocValidityAndOffsetBuffers(BaseVariableWidthVector.java:620)
at org.apache.arrow.vector.BaseVariableWidthVector.handleSafe(BaseVariableWidthVector.java:1339)
at org.apache.arrow.vector.BaseVariableWidthVector.setSafe(BaseVariableWidthVector.java:1178)
at xtdb.vector.VariableWidthVectorWriter.writeBytes(FieldVectorWriters.kt:313)
...
at polylith.clj.core.test_runner_orchestrator.interface$run.invokeStatic(interface.clj:4)
at polylith.clj.core.command.test$run.invokeStatic(test.clj:9)
at polylith.clj.core.command.core$execute.invokeStatic(core.clj:101)
at polylith.clj.core.command.interface$execute_command.invokeStatic(interface.clj:4)
at polylith.clj.core.poly_cli.core$_main.invokeStatic(core.clj:31)
at polylith.clj.core.poly_cli.core$_main.doInvoke(core.clj:7)
at clojure.lang.RestFn.applyTo(RestFn.java:137)
at polylith.clj.core.poly_cli.core.main(Unknown Source)
Caused by: java.lang.reflect.InaccessibleObjectException: Unable to make field long java.nio.Buffer.address accessible: module java.base does not "opens java.nio" to unnamed module @21fc8cf6
at java.base/java.lang.reflect.AccessibleObject.throwInaccessibleObjectException(AccessibleObject.java:391)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:367)
at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:315)
at java.base/java.lang.reflect.Field.checkCanSetAccessible(Field.java:183)
at java.base/java.lang.reflect.Field.setAccessible(Field.java:177)
at org.apache.arrow.memory.util.MemoryUtil.(MemoryUtil.java:94)
... 83 more
ERROR in (fetch--test) (ArrowBuf.java:1176)
Uncaught exception, not in assertion.
expected: nil
actual: java.lang.ExceptionInInitializerError: null
... Can you create an issue? You could also try other https://cljdoc.org/d/polylith/clj-poly/0.2.19/doc/test-runners and see if it works, until this is fixed in the default test runner.
It worked if i put jvm-opts in the :poly alias and using clojure -M:poly test I'd expect having it in :dev to be picked up as well though. Don't know if that is the intended behavior.
To be honest, Iām not sure either! Luckily, there are other users out there that may have things to say about this!
@seancorfield When trying to run with your external test runner it doesn't pick up
Nevermind I have seen in the README how to pass jvm opts using external test runner https://github.com/seancorfield/polylith-external-test-runner?tab=readme-ov-file#passing-jvm-options:jvm-opts even when they are in :poly alias
Note that :jvm-opts must be under an alias. The Clojure CLI does not support top-level :jvm-opts.
Glad you've figured out the way to pass JVM options into the subprocess that the external test runner starts for each project.
Did that solve your execute-tx hanging issue, BTW @pafitisnick?
Ah, I see your jstack output is when running via the external test runner... I'll make a suggestion over in that channel on that thread...
@seancorfield the specific output may use external test runner, but it happens with all poly test runners (kaocha and default).