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 2018/09/20 17:05:14 UTC
[bookkeeper] branch branch-4.8 updated: Shutdown appropriate
EntryLogger instance.
This is an automated email from the ASF dual-hosted git repository.
sijie pushed a commit to branch branch-4.8
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git
The following commit(s) were added to refs/heads/branch-4.8 by this push:
new 50f19ad Shutdown appropriate EntryLogger instance.
50f19ad is described below
commit 50f19ad8650f880ae129a31901715e9d625ff0e8
Author: Charan Reddy Guttapalem <re...@gmail.com>
AuthorDate: Thu Sep 20 10:04:51 2018 -0700
Shutdown appropriate EntryLogger instance.
Descriptions of the changes in this PR:
- EntryLogger's instance shutdown method should be called
- Otherwise test would flap, since in tearDown method, FileUtils.deleteDirectory can fail because of EntryLogFile PreAllocation task.
Author: cguttapalem <cg...@salesforce.com>
Reviewers: Enrico Olivelli <eo...@gmail.com>, Sijie Guo <si...@apache.org>
This closes #1686 from reddycharan/entrylogtest
(cherry picked from commit 04edde0668c30b79391f9d00ded0494bbc9aca08)
Signed-off-by: Sijie Guo <si...@apache.org>
---
.../src/test/java/org/apache/bookkeeper/bookie/EntryLogTest.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
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 9694fae..9062261 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
@@ -1076,6 +1076,7 @@ public class EntryLogTest {
*/
@Test
public void testCacheMaximumSizeEvictionPolicy() throws Exception {
+ entryLogger.shutdown();
final int cacheMaximumSize = 20;
ServerConfiguration conf = TestBKConfiguration.newServerConfiguration();
@@ -1086,7 +1087,7 @@ public class EntryLogTest {
LedgerDirsManager ledgerDirsManager = new LedgerDirsManager(conf, conf.getLedgerDirs(),
new DiskChecker(conf.getDiskUsageThreshold(), conf.getDiskUsageWarnThreshold()));
- EntryLogger entryLogger = new EntryLogger(conf, ledgerDirsManager);
+ entryLogger = new EntryLogger(conf, ledgerDirsManager);
EntryLogManagerForEntryLogPerLedger entryLogManager =
(EntryLogManagerForEntryLogPerLedger) entryLogger.getEntryLogManager();