Repository: flume Updated Branches: refs/heads/trunk aa6fb7fbd -> a582c100f
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/a582c100 Tree: http://git-wip-us.apache.org/repos/asf/flume/tree/a582c100 Diff: http://git-wip-us.apache.org/repos/asf/flume/diff/a582c100 Branch: refs/heads/trunk Commit: a582c100f5f0b368a6dcc77c2b29138ef4b28840 Parents: aa6fb7f Author: Hari Shreedharan <[email protected]> Authored: Tue Oct 14 18:17:34 2014 -0700 Committer: Hari Shreedharan <[email protected]> Committed: Tue Oct 14 18:18:41 2014 -0700 ---------------------------------------------------------------------- .../apache/flume/channel/file/TestFileChannelRestart.java | 9 +++++++++ 1 file changed, 9 insertions(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flume/blob/a582c100/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);
