flume-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hshreedha...@apache.org
Subject git commit: FLUME-2060. Failure in TestLog.testReplaySucceedsWithUnusedEmptyLogMetaDataFastReplay test on Windows
Date Wed, 19 Jun 2013 00:57:19 GMT
Updated Branches:
  refs/heads/trunk cbd4c6580 -> e60de9322


FLUME-2060. Failure in TestLog.testReplaySucceedsWithUnusedEmptyLogMetaDataFastReplay test
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/e60de932
Tree: http://git-wip-us.apache.org/repos/asf/flume/tree/e60de932
Diff: http://git-wip-us.apache.org/repos/asf/flume/diff/e60de932

Branch: refs/heads/trunk
Commit: e60de9322fbd4bd7ae96034ef86af0b65a180da6
Parents: cbd4c65
Author: Hari Shreedharan <hshreedharan@apache.org>
Authored: Tue Jun 18 17:56:22 2013 -0700
Committer: Hari Shreedharan <hshreedharan@apache.org>
Committed: Tue Jun 18 17:57:04 2013 -0700

----------------------------------------------------------------------
 .../src/test/java/org/apache/flume/channel/file/TestLog.java   | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flume/blob/e60de932/flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/TestLog.java
----------------------------------------------------------------------
diff --git a/flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/TestLog.java
b/flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/TestLog.java
index 8a5f8ad..d1f51fc 100644
--- a/flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/TestLog.java
+++ b/flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/TestLog.java
@@ -47,6 +47,7 @@ public class TestLog {
   public void setup() throws IOException {
     transactionID = 0;
     checkpointDir = Files.createTempDir();
+    FileUtils.forceDeleteOnExit(checkpointDir);
     Assert.assertTrue(checkpointDir.isDirectory());
     dataDirs = new File[3];
     for (int i = 0; i < dataDirs.length; i++) {
@@ -415,8 +416,9 @@ public class TestLog {
     FlumeEventPointer eventPointer = log.put(transactionID, eventIn);
     log.commitPut(transactionID); // this is not required since
     log.close();
-    FileUtils.deleteDirectory(checkpointDir);
-    Assert.assertTrue(checkpointDir.mkdir());
+    checkpointDir = Files.createTempDir();
+    FileUtils.forceDeleteOnExit(checkpointDir);
+    Assert.assertTrue(checkpointDir.isDirectory());
     log = new Log.Builder().setCheckpointInterval(1L).setMaxFileSize(
         MAX_FILE_SIZE).setQueueSize(CAPACITY).setCheckpointDir(
             checkpointDir).setLogDirs(dataDirs)


Mime
View raw message