pitrou commented on code in PR #39502:
URL: https://github.com/apache/arrow/pull/39502#discussion_r1446209268
##########
dev/archery/archery/integration/tester_java.py:
##########
@@ -83,13 +82,32 @@ def setup_jpype():
import jpype
jar_path = f"{_ARROW_TOOLS_JAR}:{_ARROW_C_DATA_JAR}"
# XXX Didn't manage to tone down the logging level here (DEBUG -> INFO)
+ java_opts = _JAVA_OPTS[:]
+ proc = subprocess.run(
+ ['java', '--add-opens'],
+ stderr=subprocess.PIPE,
+ stdout=subprocess.PIPE,
+ text=True)
+ if 'Unrecognized option: --add-opens' not in proc.stderr:
+ # Java 9+
+ java_opts.append('--add-opens=java.base/java.nio=ALL-UNNAMED')
jpype.startJVM(jpype.getDefaultJVMPath(),
"-Djava.class.path=" + jar_path,
# This flag is too heavy for IPC and Flight tests
"-Darrow.memory.debug.allocator=true",
# Reduce internal use of signals by the JVM
"-Xrs",
- *_JAVA_OPTS)
+ *java_opts)
+
+
[email protected]_cache
+def _enable_c_data_tests():
+ try:
+ import jpype # noqa: F401 # ignore unused
Review Comment:
My concern here is that the tests could be skipped if `jpype` is not
available for some reason.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]