apache / arrow

Apache Arrow is a multi-language toolbox for accelerated data interchange and in-memory processing
https://arrow.apache.org/
Apache License 2.0
14.36k stars 3.49k forks source link

[Java] Find a proper way to test VM options (share system property between Main/Test code) #36390

Open davisusanibar opened 1 year ago

davisusanibar commented 1 year ago

Describe the enhancement requested

Java Test code and Java Main code cannot share system property variables.

The current workaround is to use reflection on unit testing code to override main code system properties.

We need a complete solution that covers JDK17+ Java versions without reflection access to test for example System.getProperty(DEBUG_ALLOCATOR) at https://github.com/apache/arrow/blob/main/java/memory/memory-core/src/main/java/org/apache/arrow/memory/BaseAllocator.java#L52

Component(s)

Java

raulcd commented 1 year ago

@danepitkin @davisusanibar I am moving this to 14.0.0

danepitkin commented 1 year ago

14.0.0 works! Thanks @raulcd !