Skip to content

Commit

Permalink
Enable reflection during arrow-memory-core tests
Browse files Browse the repository at this point in the history
The tests themselves (specifically testEnableHistoricalLog)
use reflection on java.lang.reflect so surefire needs to
enable this permission.
  • Loading branch information
jduo committed Dec 11, 2023
1 parent b421789 commit e8840dd
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion java/memory/memory-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>

<configuration>
<excludes>
<!-- Test is only useful when NOT running with add-opens -->
Expand All @@ -54,6 +53,30 @@
</build>

<profiles>
<profile>
<id>error-prone-jdk11+</id>
<activation>
<jdk>[11,]</jdk>
<property>
<name>!m2e.version</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration combine.self="override">
<argLine>--add-opens=java.base/java.lang.reflect=org.apache.arrow.memory.core --add-opens=java.base/java.nio=org.apache.arrow.memory.core,ALL-UNNAMED</argLine>
<excludes>
<!-- Test is only useful when NOT running with add-opens -->
<exclude>**/TestOpens.java</exclude>
</excludes>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>opens-tests</id>
<!-- Run tests WITHOUT add-opens to make sure we fail-fast -->
Expand Down

0 comments on commit e8840dd

Please sign in to comment.