davisusanibar commented on code in PR #14066:
URL: https://github.com/apache/arrow/pull/14066#discussion_r976783436


##########
java/memory/memory-core/pom.xml:
##########
@@ -37,4 +37,58 @@
     </dependency>
   </dependencies>
 
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+
+        <configuration>
+          <excludes>
+            <!-- Test is only useful when NOT running with add-opens -->
+            <exclude>**/TestOpens.java</exclude>
+          </excludes>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+  <profiles>
+    <profile>
+      <id>opens-tests</id>
+      <!-- Run tests WITHOUT add-opens to make sure we fail-fast -->
+      <activation>
+        <jdk>[16,]</jdk>

Review Comment:
   Trying to get the TestOpens exception with JRE18 but if finished without 
that error, Is there some additional configuration needed? Probably `mvn 
-Dtest="TestOpens" clean test` not thrown that exception because for test this 
inherit 
[parent](https://github.com/apache/arrow/blob/59b57287e3e17e84ac41fdf7662fb2be2d4ef9f5/java/pom.xml#L842)
 configuration.
   
   ````
   [ERROR] Failures: 
   [ERROR]   TestOpens.testMemoryUtilFailsLoudly:32 Expected 
java.lang.Throwable to be thrown, but nothing was thrown.
   ````



-- 
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]

Reply via email to