You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "davisusanibar (via GitHub)" <gi...@apache.org> on 2023/06/13 18:16:47 UTC

[GitHub] [arrow] davisusanibar commented on a diff in pull request #36042: GH-34338: [Java] Removing the automatic enabling of BaseAllocator.DEBUG on -ea

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


##########
java/memory/memory-core/src/test/java/org/apache/arrow/memory/TestArrowBuf.java:
##########
@@ -138,12 +129,44 @@ public void testSetBytesBigEndian() {
     assertFalse(data.hasArray());
     assertFalse(data.isDirect());
     assertEquals(ByteOrder.BIG_ENDIAN, data.order());
-    try (ArrowBuf buf = allocator.buffer(expected.length)) {
+    try (BufferAllocator allocator = new RootAllocator(128);
+        ArrowBuf buf = allocator.buffer(expected.length)) {
       buf.setBytes(0, data);
       byte[] actual = new byte[expected.length];
       buf.getBytes(0, actual);
       assertArrayEquals(expected, actual);
     }
   }
 
+  @Test
+  public void testEnabledAssertion() {
+    ((Logger) LoggerFactory.getLogger("org.apache.arrow")).setLevel(Level.TRACE);
+    ClassLoader.getSystemClassLoader().setDefaultAssertionStatus(true);

Review Comment:
   Added



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org