You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@bookkeeper.apache.org by si...@apache.org on 2017/12/22 05:45:47 UTC
[bookkeeper] branch master updated: EntryLogTest,
LedgerCacheTest: use correct tmp dir
This is an automated email from the ASF dual-hosted git repository.
sijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git
The following commit(s) were added to refs/heads/master by this push:
new 037ce71 EntryLogTest,LedgerCacheTest: use correct tmp dir
037ce71 is described below
commit 037ce71e08bb7ca6a3d50c9b2d5ace39f37eaf18
Author: Samuel Just <sj...@salesforce.com>
AuthorDate: Thu Dec 21 21:45:41 2017 -0800
EntryLogTest,LedgerCacheTest: use correct tmp dir
These tests weren't overriding the journal dir and so weren't using
an IOUtils tmp dir for the journal.
(bug W-4267131)
Signed-off-by: Samuel Just <sjustsalesforce.com>
Author: Samuel Just <sj...@salesforce.com>
Reviewers: Sijie Guo <si...@apache.org>
This closes #910 from athanatos/forupstream/small-fixes-1/tmpdir
---
.../src/test/java/org/apache/bookkeeper/bookie/EntryLogTest.java | 7 +++++++
.../test/java/org/apache/bookkeeper/bookie/LedgerCacheTest.java | 2 ++
2 files changed, 9 insertions(+)
diff --git a/bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/EntryLogTest.java b/bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/EntryLogTest.java
index f402a94..c60a997 100644
--- a/bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/EntryLogTest.java
+++ b/bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/EntryLogTest.java
@@ -80,6 +80,8 @@ public class EntryLogTest {
int gcWaitTime = 1000;
ServerConfiguration conf = TestBKConfiguration.newServerConfiguration();
+ conf.setJournalDirName(tmpDir.toString());
+
conf.setGcWaitTime(gcWaitTime);
conf.setLedgerDirNames(new String[] {tmpDir.toString()});
Bookie bookie = new Bookie(conf);
@@ -120,6 +122,7 @@ public class EntryLogTest {
Bookie.checkDirectoryStructure(curDir);
ServerConfiguration conf = TestBKConfiguration.newServerConfiguration();
+ conf.setJournalDirName(tmpDir.toString());
conf.setLedgerDirNames(new String[] {tmpDir.toString()});
Bookie bookie = new Bookie(conf);
// create some entries
@@ -206,6 +209,7 @@ public class EntryLogTest {
File ledgerDir1 = createTempDir("bkTest", ".dir");
File ledgerDir2 = createTempDir("bkTest", ".dir");
ServerConfiguration conf = TestBKConfiguration.newServerConfiguration();
+ conf.setJournalDirName(ledgerDir1.toString());
conf.setLedgerDirNames(new String[] { ledgerDir1.getAbsolutePath(),
ledgerDir2.getAbsolutePath() });
Bookie bookie = new Bookie(conf);
@@ -240,6 +244,8 @@ public class EntryLogTest {
int gcWaitTime = 1000;
ServerConfiguration conf = TestBKConfiguration.newServerConfiguration();
+ conf.setJournalDirName(tmpDir.toString());
+
conf.setGcWaitTime(gcWaitTime);
conf.setLedgerDirNames(new String[] {tmpDir.toString()});
Bookie bookie = new Bookie(conf);
@@ -276,6 +282,7 @@ public class EntryLogTest {
ServerConfiguration conf = TestBKConfiguration.newServerConfiguration();
conf.setGcWaitTime(gcWaitTime);
conf.setLedgerDirNames(new String[] { tmpDir.toString() });
+ conf.setJournalDirName(tmpDir.toString());
Bookie bookie = new Bookie(conf);
// create some entries
diff --git a/bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/LedgerCacheTest.java b/bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/LedgerCacheTest.java
index 53083af..2fe5e75 100644
--- a/bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/LedgerCacheTest.java
+++ b/bookkeeper-server/src/test/java/org/apache/bookkeeper/bookie/LedgerCacheTest.java
@@ -272,6 +272,7 @@ public class LedgerCacheTest {
File ledgerDir2 = createTempDir("bkTest", ".dir");
ServerConfiguration conf = TestBKConfiguration.newServerConfiguration();
conf.setLedgerDirNames(new String[] { ledgerDir1.getAbsolutePath(), ledgerDir2.getAbsolutePath() });
+ conf.setJournalDirName(ledgerDir1.toString());
Bookie bookie = new Bookie(conf);
InterleavedLedgerStorage ledgerStorage = ((InterleavedLedgerStorage) bookie.ledgerStorage);
@@ -517,6 +518,7 @@ public class LedgerCacheTest {
ServerConfiguration conf = TestBKConfiguration.newServerConfiguration();
conf.setGcWaitTime(gcWaitTime);
conf.setLedgerDirNames(new String[] { tmpDir.toString() });
+ conf.setJournalDirName(tmpDir.toString());
conf.setLedgerStorageClass(FlushTestSortedLedgerStorage.class.getName());
Bookie bookie = new Bookie(conf);
--
To stop receiving notification emails like this one, please contact
['"commits@bookkeeper.apache.org" <co...@bookkeeper.apache.org>'].