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 <[email protected]>
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 <[email protected]>
Reviewers: Enrico Olivelli <[email protected]>, Sijie Guo
<[email protected]>
This closes #1686 from reddycharan/entrylogtest
(cherry picked from commit 04edde0668c30b79391f9d00ded0494bbc9aca08)
Signed-off-by: Sijie Guo <[email protected]>
---
.../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();