lidavidm commented on code in PR #1492:
URL: https://github.com/apache/arrow-java/pull/1492#discussion_r4595303224


##########
c/src/test/java/org/apache/arrow/c/ImportOutOfMemoryTest.java:
##########
@@ -99,6 +106,74 @@ public void importOomDoesNotLeakExportedArray() {
     }
   }
 
+  @Test
+  public void streamImportOomDoesNotLeakExportedBatch() throws Exception {
+    // Reading the schema lazily, the first batch can fail allocating the 
schema struct.
+    streamImportOomDoesNotLeakExportedBatch(false);
+    // Reading the schema first, it can fail allocating the struct the batch 
moves into.
+    streamImportOomDoesNotLeakExportedBatch(true);
+  }

Review Comment:
   You should be able to do this with JUnit 5's test parameterization



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