[Java] Find a proper way to test VM options (share system property between Main/Test code)
- Dominant language
- Java
- Stars
- 94
- Forks
- 152
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 11
Description
### 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
Contributor guide
Research direction
Start with java/memory/memory-core/src/main/java/org/apache/arrow/memory/BaseAllocator.java, especially the DEBUG_ALLOCATOR system-property access. Investigate how Java Main and test code currently receive system properties on JDK 17+ and why the reflection workaround is required. Done means a complete non-reflection solution that lets tests exercise the relevant VM options.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- testing-qa
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100