Repository: flume
Updated Branches:
  refs/heads/flume-1.6 93ff446ff -> 150dbc519


FLUME-2482. File Channel tests must disable scheduled checkpoint to avoid a 
race condition with forced checkpoint.

(Johny Rufus via Hari)


Project: http://git-wip-us.apache.org/repos/asf/flume/repo
Commit: http://git-wip-us.apache.org/repos/asf/flume/commit/150dbc51
Tree: http://git-wip-us.apache.org/repos/asf/flume/tree/150dbc51
Diff: http://git-wip-us.apache.org/repos/asf/flume/diff/150dbc51

Branch: refs/heads/flume-1.6
Commit: 150dbc519d0552ea94e1d6de2d1b455eae022155
Parents: 93ff446
Author: Hari Shreedharan <[email protected]>
Authored: Tue Oct 14 18:17:34 2014 -0700
Committer: Hari Shreedharan <[email protected]>
Committed: Tue Oct 14 18:17:34 2014 -0700

----------------------------------------------------------------------
 .../apache/flume/channel/file/TestFileChannelRestart.java   | 9 +++++++++
 1 file changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flume/blob/150dbc51/flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/TestFileChannelRestart.java
----------------------------------------------------------------------
diff --git 
a/flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/TestFileChannelRestart.java
 
b/flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/TestFileChannelRestart.java
index 0c6afc4..d5fe6fb 100644
--- 
a/flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/TestFileChannelRestart.java
+++ 
b/flume-ng-channels/flume-file-channel/src/test/java/org/apache/flume/channel/file/TestFileChannelRestart.java
@@ -67,6 +67,15 @@ public class TestFileChannelRestart extends 
TestFileChannelBase {
   public void teardown() {
     super.teardown();
   }
+
+  @Override
+  protected FileChannel createFileChannel(Map<String, String> overrides) {
+    // FLUME-2482, making sure scheduled checkpoint never gets called
+    overrides.put(FileChannelConfiguration.CHECKPOINT_INTERVAL, "6000000");
+    return TestUtils.createFileChannel(checkpointDir.getAbsolutePath(),
+            dataDir, backupDir.getAbsolutePath(), overrides);
+  }
+
   @Test
   public void testRestartLogReplayV1() throws Exception {
     doTestRestart(true, false, false, false);

Reply via email to