use of com.zimbra.cs.store.http.HttpStoreManagerTest.MockHttpStoreManager in project zm-mailbox by Zimbra.
the class MailboxTestUtil method clearData.
/**
* Clears the database and index.
* @param zimbraServerDir the directory that contains the ZimbraServer project
*/
public static void clearData(String zimbraServerDir) throws Exception {
HSQLDB.clearDatabase(zimbraServerDir);
MailboxManager.getInstance().clearCache();
MailboxIndex.shutdown();
File index = new File("build/test/index");
if (index.isDirectory()) {
deleteDirContents(index);
}
StoreManager sm = StoreManager.getInstance();
if (sm instanceof MockStoreManager) {
((MockStoreManager) sm).purge();
} else if (sm instanceof MockHttpStoreManager) {
MockHttpStore.purge();
}
DocumentHandler.resetLocalHost();
EphemeralStore.getFactory().shutdown();
}
Aggregations