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 04edde0  Shutdown appropriate EntryLogger instance.
04edde0 is described below

commit 04edde0668c30b79391f9d00ded0494bbc9aca08
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
---
 .../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();
 

Reply via email to