/** * @param cache Cache. */ private void tearDown(IgniteCache cache) { cache.clear(); cache.removeAll(); }
/** * initialize the Gene pool */ void initializeGenePopulation() { geneCache.clear(); List<Gene> genePool = cfg.getGenePool(); for (Gene gene : genePool) geneCache.put(gene.id(), gene); }
/** {@inheritDoc} */ @Override protected void afterTest() throws Exception { super.afterTest(); awaitPartitionMapExchange(); client.cache(CACHE_ACCOUNT).clear(); client.cache(CACHE_STOCK).clear(); client.cache(CACHE_TRADE).clear(); client.cache(CACHE_REPORT).clear(); client.cache(CACHE_LIST).clear(); }
/** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { super.beforeTest(); jcache(0).clear(); try (Statement s = conn.createStatement()) { s.executeUpdate(ITEMS_SQL); } } }
/** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { super.beforeTest(); jcache(0).clear(); try (Statement s = conn.createStatement()) { s.executeUpdate(ITEMS_SQL); } } }
/** {@inheritDoc} */ @Override protected void afterTest() throws Exception { IgniteCache<?, ?> cache = jcache(); if (cache != null) cache.clear(); store.reset(); }
/** {@inheritDoc} */ @Override protected void afterTest() throws Exception { jcache().clear(); store.reset(); }
/** {@inheritDoc} */ @Override protected void afterTest() throws Exception { IgniteCache<Integer, Person> cache = grid(0).cache(CACHE_NAME); cache.clear(); }
/** {@inheritDoc} */ @Override protected void afterTest() throws Exception { cache().clear(); super.afterTest(); }
/** * Initialize the population of Chromosomes */ void initializePopulation() { int populationSize = cfg.getPopulationSize(); populationCache.clear(); for (int j = 0; j < populationSize; j++) { Chromosome chromosome = createChromosome(cfg.getChromosomeLen()); populationCache.put(chromosome.id(), chromosome); } }
/** {@inheritDoc} */ @Override protected void afterTest() throws Exception { ignite(0).cache(DEFAULT_CACHE_NAME).clear(); super.afterTest(); }
/** {@inheritDoc} */ @Override protected void afterTest() throws Exception { super.afterTest(); IgniteCache cache = ignite(0).cache(CACHE_NAME); if (cache != null) cache.clear(); }
/** * Clear cache with check. */ private static void clearCache(IgniteEx ignite) { IgniteCache<Integer, Person> cache = ignite.cache(PERSON_CACHE); cache.clear(); List all = cache.query(new TextQuery<>(Person.class, "1*")).getAll(); assertTrue(all.isEmpty()); }
/** {@inheritDoc} */ @Override protected void afterTest() throws Exception { U.closeQuiet(conn); ignite(0).cache(DEFAULT_CACHE_NAME).clear(); super.afterTest(); }
/** {@inheritDoc} */ @Override protected void afterTest() throws Exception { jcache().clear(); assertEquals(0, jcache().localSize()); }
/** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { MvccFeatureChecker.failIfNotSupported(MvccFeatureChecker.Feature.CACHE_EVENTS); Assume.assumeFalse("https://issues.apache.org/jira/browse/IGNITE-7952", MvccFeatureChecker.forcedMvcc()); for (Ignite g : G.allGrids()) g.cache(DEFAULT_CACHE_NAME).clear(); }
/** {@inheritDoc} */ @Override protected void afterTest() throws Exception { removeListeners(ignite1); removeListeners(ignite2); lsnrs.clear(); for (int i = 1; i <= 3; i++) { jcache(i).clear(); assertTrue( "Cache isn't empty [i=" + i + ", entries=" + ((IgniteKernal)grid(i)).internalCache(DEFAULT_CACHE_NAME).entries() + "]", jcache(i).localSize() == 0); } }
/** * */ @Test public void testRollbackSimple() throws Exception { Assume.assumeFalse("https://issues.apache.org/jira/browse/IGNITE-7952", MvccFeatureChecker.forcedMvcc()); startClient(); for (Ignite ignite : G.allGrids()) { testRollbackSimple0(ignite); ignite.cache(CACHE_NAME).clear(); } }
/** {@inheritDoc} */ @Override protected void afterTest() throws Exception { super.afterTest(); if (GRID_CNT > 0) grid(0).cache(DEFAULT_CACHE_NAME).removeAll(); for (int i = 0; i < GRID_CNT; i++) { grid(i).cache(DEFAULT_CACHE_NAME).clear(); assert grid(i).cache(DEFAULT_CACHE_NAME).localSize() == 0; } }