ADBalici commented on a change in pull request #13821:
URL: https://github.com/apache/beam/pull/13821#discussion_r566722653
##########
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:
Of course. Thought of this, but I didn't want to mess with the old
method signature. Glad you've suggested this. Sorted!
----------------------------------------------------------------
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]