@Override protected void setup() throws Exception { super.setup(); loader = (AdvancedLoadWriteStore) TestingUtil.getFirstLoader(cache); }
@Override protected void teardown() { super.teardown(); if (executor != null) { executor.shutdownNow(); } }
protected void assertNoTransactions() { assertNoTransactions(cache); }
@AfterMethod(alwaysRun=true) protected void destroyAfterMethod() { if (cleanupAfterMethod()) teardown(); }
@BeforeMethod(alwaysRun = true) protected void createBeforeMethod() throws Exception { try { if (cleanupAfterMethod()) setup(); else assert cleanupAfterTest() : "you must either cleanup after test or after method"; } catch (Exception e) { log.error("Unexpected!", e); throw e; } }
@AfterClass(alwaysRun=true) protected void destroyAfterClass() { try { if (cleanupAfterTest()) teardown(); } catch (Exception e) { log.error("Unexpected!", e); } }
@AfterMethod(alwaysRun=true) protected void clearContent() { if (cleanupAfterTest()) TestingUtil.clearContent(cacheManager); }
@BeforeClass(alwaysRun = true) protected void createBeforeClass() throws Exception { try { if (cleanupAfterTest()) setup(); else assert cleanupAfterMethod() : "you must either cleanup after test or after method"; } catch (Exception e) { log.error("Unexpected!", e); throw e; } }
@Override protected void setup() throws Exception { super.setup(); store = (AdvancedLoadWriteStore) TestingUtil.getFirstLoader(cache); }
@Override protected void teardown() { if (cache != null) { // a proper cache.clear() should ensure indexes and stores are cleared too if present // this is better and more complete than the cleanup performed by the superclass cache.clear(); } super.teardown(); }
@Override protected void setup() throws Exception { super.setup(); server = PerThreadMBeanServerLookup.getThreadMBeanServer(); }
@Override protected void teardown() { TestingUtil.clearContent(cacheManager); super.teardown(); }
@Override protected void setup() throws Exception { super.setup(); server = HotRodTestingUtil.startHotRodServer(cacheManager); }
@Override protected void teardown() { Util.recursiveFileRemove(rootDir); super.teardown(); }
@Override protected void setup() throws Exception { super.setup(); searchManager = Search.getSearchManager(cache); }
@Override protected void teardown() { Security.doAs(ADMIN, (PrivilegedAction<Void>) () -> { GrantDenyTest.super.teardown(); return null; }); }
@Override protected void setup() throws Exception { super.setup(); persistenceManager = (PersistenceManagerImpl) TestingUtil.extractComponent(cache, PersistenceManager.class); store = (AdvancedLoadWriteStore) persistenceManager.getAllWriters().get(1); }
@Override protected void teardown() { super.teardown(); TestingUtil.recursiveFileRemove(LOCATION); }
@Override protected void setup() throws Exception { super.setup(); hotRodServer = createStartHotRodServer(cacheManager); hotRodClient = connectClient(); }
@Override protected void teardown() { log.debug("Killing Hot Rod client and server"); killClient(hotRodClient); killServer(hotRodServer); super.teardown(); }