@Override public Void call() throws Exception { grid(gridIdx).destroyCache(cacheConfiguration(gridIdx, cacheIdx).getName()); return null; } });
/** {@inheritDoc} */ @Override protected void afterTest() throws Exception { grid(0).destroyCache(DEFAULT_CACHE_NAME); }
/** */ protected void destroyCaches() throws Exception { grid(0).destroyCache(ATOMIC_CACHE); grid(0).destroyCache(TRANSACT_CACHE); }
/** {@inheritDoc} */ @Override protected void afterTest() throws Exception { grid(0).destroyCache(CACHE_NAME); }
private void destroyCache() { grid(0).destroyCache("person"); }
/** {@inheritDoc} */ @Override protected void afterTestsStopped() throws Exception { grid(0).destroyCache(Organization.class.getSimpleName()); grid(0).destroyCache(Person.class.getSimpleName()); grid(0).destroyCache(OTHER_CACHE_NAME); super.afterTestsStopped(); }
/** {@inheritDoc} */ @Override protected void afterTest() throws Exception { grid(0).destroyCache(DEFAULT_CACHE_NAME); conn.close(); assertTrue(conn.isClosed()); }
/** {@inheritDoc} */ @Override protected void afterTest() throws Exception { grid(0).destroyCache(DEFAULT_CACHE_NAME); super.afterTest(); }
/** {@inheritDoc} */ @Override protected void afterTest() throws Exception { grid(0).destroyCache(DEFAULT_CACHE_NAME); super.afterTest(); }
/** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { super.beforeTest(); clientNode.destroyCache(PERSON_CACHE); createAndFillServerCache(); }
/** {@inheritDoc} */ @Override protected void afterTest() throws Exception { grid(0).destroyCache(DEFAULT_CACHE_NAME); super.afterTest(); }
/** {@inheritDoc} */ @Override public ClientResponse process(ClientConnectionContext ctx) { String cacheName = ClientCacheRequest.cacheDescriptor(ctx, cacheId).cacheName(); ctx.kernalContext().grid().destroyCache(cacheName); return super.process(ctx); } }
/** {@inheritDoc} */ @Override protected void afterTestsStopped() throws Exception { grid(0).destroyCache(CACHE_NAME); super.afterTestsStopped(); }
@Override protected void afterTest() throws Exception { super.afterTest(); grid("client").destroyCache(CACHE_NAME); }
/** * Test that attempting to destroy via cache API a cache created via SQL finishes successfully. * @throws Exception if failed. */ @Test public void testDestroyDynamicSqlCache() throws Exception { execute("CREATE TABLE \"Person\" (\"id\" int, \"city\" varchar," + " \"name\" varchar, \"surname\" varchar, \"age\" int, PRIMARY KEY (\"id\", \"city\")) WITH " + "\"template=cache\""); client().destroyCache(cacheName("Person")); }
/** {@inheritDoc} */ @Override protected void beforeTest() throws Exception { super.beforeTest(); newBarrier(1); ignite.destroyCache(DEFAULT_CACHE_NAME); IgniteCache<Integer, Integer> cache = ignite.getOrCreateCache(new CacheConfiguration<Integer, Integer>() .setName(DEFAULT_CACHE_NAME) .setQueryEntities(Collections.singletonList(new QueryEntity(Integer.class, Integer.class))) ); cache.put(100000, 0); }
/** @throws Exception If failed. */ @Test public void testNamedCache() throws Exception { try { IgniteCache<Integer, Integer> cache = jcache("tmp_int", Integer.class, Integer.class); for (int i = 0; i < 200; i++) cache.put(i, i); QueryCursor<List<?>> qry = cache.query(sqlFieldsQuery("select * from Integer")); Collection<List<?>> res = qry.getAll(); assert res != null; assert res.size() == 200; } finally { grid(0).destroyCache("tmp_int"); } }
/** {@inheritDoc} */ @Override protected void afterTest() throws Exception { for (int i = 0; i < GRID_CNT; i++) { Ignite g = grid(i); IgniteCache<Integer, String> c = g.cache(DEFAULT_CACHE_NAME); c.removeAll(); assertEquals("Cache size mismatch for grid [igniteInstanceName=" + g.name() + ", entrySet=" + entrySet(c) + ']', 0, c.size()); } grid(0).destroyCache(DEFAULT_CACHE_NAME); }
/** * @throws Exception If failed. */ @Test public void testDestroyCache() throws Exception { IgniteEx ignite = startGrid(1); ignite.cluster().active(true); IgniteCache<Object, Object> cache = ignite.getOrCreateCache("test"); cache.put(1, new IndexedObject(1)); ignite.destroyCache("test"); cache = ignite.getOrCreateCache("test"); // No entry available after cache destroy. assertNull(cache.get(1)); }
/** * @throws Exception If failed. */ @Test public void testEncryptedCacheDestroy() throws Exception { T2<IgniteEx, IgniteEx> grids = startTestGrids(true); createEncryptedCache(grids.get1(), grids.get2(), cacheName(), null); checkEncryptedCaches(grids.get1(), grids.get2()); String encryptedCacheName = cacheName(); grids.get1().destroyCache(encryptedCacheName); checkCacheDestroyed(grids.get2(), encryptedCacheName, null, true); stopAllGrids(true); grids = startTestGrids(false); checkCacheDestroyed(grids.get1(), encryptedCacheName, null, true); }