iemejia commented on a change in pull request #13821:
URL: https://github.com/apache/beam/pull/13821#discussion_r566661345



##########
File path: 
sdks/java/core/src/test/java/org/apache/beam/sdk/io/CompressedSourceTest.java
##########
@@ -907,30 +1052,33 @@ public void close() throws IOException {
   }
 
   /** Writes a single output file. */
-  private void writeFile(File file, byte[] input, CompressionMode mode) throws 
IOException {
-    try (OutputStream os = getOutputStreamForMode(mode, new 
FileOutputStream(file))) {
-      os.write(input);
+  private void writeFile(File file, byte[] input, Compression compression) 
throws IOException {
+    if (compression == Compression.SNAPPY) {
+      try (OutputStream os =
+          getOutputStreamForModeWithDecompressedSizeInfo(

Review comment:
       Please add the `byte[] input` as a new parameter of 
`getOutputStreamForMode` so we can better deal with the case specifics there. 




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