Updated Branches: refs/heads/flume-1.4 f49607c4c -> bac060820
FLUME-2057. Failures in FileChannel's TestEventQueueBackingStoreFactory on Windows (Roshan Naik via Hari Shreedharan) Project: http://git-wip-us.apache.org/repos/asf/flume/repo Commit: http://git-wip-us.apache.org/repos/asf/flume/commit/bac06082 Tree: http://git-wip-us.apache.org/repos/asf/flume/tree/bac06082 Diff: http://git-wip-us.apache.org/repos/asf/flume/diff/bac06082 Branch: refs/heads/flume-1.4 Commit: bac060820a0f50f6173231a2f4a10c2d5c5a2897 Parents: f49607c Author: Hari Shreedharan <[email protected]> Authored: Tue Jun 18 17:18:45 2013 -0700 Committer: Hari Shreedharan <[email protected]> Committed: Tue Jun 18 17:18:45 2013 -0700 ---------------------------------------------------------------------- .../test/java/org/apache/flume/channel/file/TestUtils.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flume/blob/bac06082/flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/TestUtils.java ---------------------------------------------------------------------- diff --git a/flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/TestUtils.java b/flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/TestUtils.java index a5ab45a..75e118e 100644 --- a/flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/TestUtils.java +++ b/flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/TestUtils.java @@ -292,8 +292,11 @@ public class TestUtils { public static void copyDecompressed(String resource, File output) throws IOException { URL input = Resources.getResource(resource); - ByteStreams.copy(new GZIPInputStream(input.openStream()), - new FileOutputStream(output)); + FileOutputStream fos = new FileOutputStream(output); + GZIPInputStream gzis = new GZIPInputStream(input.openStream()); + ByteStreams.copy(gzis, fos); + fos.close(); + gzis.close(); } public static Context createFileChannelContext(String checkpointDir,
