@AfterMethod public void tearDown() throws PersistenceException { store.clear(); TestingUtil.killCacheManagers(cm); }
@AfterMethod public void afterMethod() throws PersistenceException { if (cache != null) cache.clear(); if (store != null) store.clear(); }
@AfterMethod public void clearStore() throws Exception { cacheStore.clear(); assertRowCount(0); }
@AfterMethod public void clearStats() { for (Cache<?, ?> c: caches) { log.trace("Clearing stats for cache store on cache "+ c); AdvancedLoadWriteStore cs = TestingUtil.getFirstLoader(c); cs.clear(); } }
@AfterMethod(alwaysRun = true) public void tearDown() throws PersistenceException { try { if (cl != null) { cl.clear(); cl.destroy(); } if (marshaller != null) { marshaller.stop(); } } finally { cl = null; } }
public void testClear() throws Exception { assertRowCount(0); cacheStore.write(new MarshalledEntryImpl(MIRCEA, "value", null, marshaller)); cacheStore.write(new MarshalledEntryImpl(MANIK, "value", null, marshaller)); assertRowCount(2); cacheStore.clear(); assertRowCount(0); }