Updated Branches:
  refs/heads/trunk b8cf789b8 -> cbd4c6580

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/cbd4c658
Tree: http://git-wip-us.apache.org/repos/asf/flume/tree/cbd4c658
Diff: http://git-wip-us.apache.org/repos/asf/flume/diff/cbd4c658

Branch: refs/heads/trunk
Commit: cbd4c6580f83147511459fa7443f54ac4f1b847f
Parents: b8cf789
Author: Hari Shreedharan <[email protected]>
Authored: Tue Jun 18 17:18:45 2013 -0700
Committer: Hari Shreedharan <[email protected]>
Committed: Tue Jun 18 17:19:33 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/cbd4c658/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,

Reply via email to