logger.setLevel(oldLevel);
}
}
public void testClearHistory_Persistence() throws Exception {
myDispatcher.sendNow(myUser, new MockMessage(new Date()));
Thread.sleep(SAVE_WAIT_TIMEOUT);
assertFalse(myDispatcher.isHistoryEmpty());
myDispatcher.clearHistory();
Thread.sleep(SAVE_WAIT_TIMEOUT);
assertEquals("History should be deleted", 0, new File(myIdeFacade.getCacheDir(), "history").listFiles().length);
myDispatcher.sendNow(myUser, new MockMessage(new Date()));
myDispatcher.clearHistory();
Thread.sleep(SAVE_WAIT_TIMEOUT);
assertEquals("History should be deleted", 0, new File(myIdeFacade.getCacheDir(), "history").listFiles().length);
assertEquals(0, myDispatcher.getHistory(myUser, null).length);