jmark109 commented on a change in pull request #206:
URL: https://github.com/apache/commons-io/pull/206#discussion_r580305820



##########
File path: 
src/test/java/org/apache/commons/io/output/DeferredFileOutputStreamTest.java
##########
@@ -365,4 +370,55 @@ private void verifyResultFile(final File testFile) {
             fail("Unexpected IOException");
         }
     }
+
+    /**
+     * Tests the case where the amount of data falls below the threshold, and 
is therefore confined to memory.
+     * Testing the getInputStream() method.
+     */
+    @ParameterizedTest(name = "initialBufferSize = {0}")
+    @MethodSource("data")
+    public void testBelowThresholdGetInputStream(final int initialBufferSize) 
throws IOException {
+        final DeferredFileOutputStream dfos = new 
DeferredFileOutputStream(testBytes.length + 42, initialBufferSize,

Review comment:
       Won't work here since the `DeferredFileOutputStream` needs to be closed 
while it is still in scope in order to execute `toInputStream()`




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to