Moved test of MapDBPersistenceStore into the test unit

This commit is contained in:
andsel
2015-09-29 22:07:45 +02:00
parent 9effc1edb5
commit b7169271ac
3 changed files with 14 additions and 75 deletions
@@ -59,7 +59,7 @@ public class MapDBPersistentStore implements IMessagesStore, ISessionsStore {
private DB m_db;
private String m_storePath;
private final ScheduledExecutorService m_scheduler = Executors.newScheduledThreadPool(1);
protected final ScheduledExecutorService m_scheduler = Executors.newScheduledThreadPool(1);
/*
* The default constructor will create an in memory store as no file path was specified
@@ -311,6 +311,10 @@ public class MapDBPersistentStore implements IMessagesStore, ISessionsStore {
}
public void close() {
if (this.m_db.isClosed()) {
LOG.debug("already closed");
return;
}
this.m_db.commit();
LOG.debug("persisted subscriptions {}", m_persistentSubscriptions);
this.m_db.close();