stop
171172173174175176177178179180181
{ TreeCache cache = (TreeCache) caches.get(id); if (cache != null) { try { cache.stopService(); cache.destroyService(); caches.remove(id); } catch (Exception e) { System.out.println("Exception stopping cache " + e.getMessage());
5859606162636465666768
Assert.assertEquals("value2", cache1.get(fqn, "key2")); Assert.assertNull("Should have been invalidated!", cache2.get(fqn)); // clean up. cache1.stopService(); cache2.stopService(); cache1 = null; cache2 = null; } public void testUnnecessaryEvictions() throws Exception
8990919293949596979899
assertEquals("world", cache2.get(fqn2, "hello")); assertNull(cache1.get(fqn1, "hello")); assertNull(cache1.get(fqn2, "hello")); cache1.stopService(); cache2.stopService(); cache1 = null; cache2 = null; }
129130131132133134135136137138139
TestingUtil.sleepThread(500); // give it time to broadcast the evict call Assert.assertNull("Should have been invalidated!", cache2.get(fqn)); // clean up. cache1.stopService(); cache2.stopService(); cache1 = null; cache2 = null; }
188189190191192193194195196197198
Assert.assertEquals("value2", cache1.get(fqn, "key2")); Assert.assertNull("Should not have committed", cache2.get(fqn)); // clean up. cache1.stopService(); cache2.stopService(); cache1 = null; cache2 = null; }
240241242243244245246247248249250
{ Assert.assertTrue("Ought to have failed!", true); } // clean up. cache1.stopService(); cache2.stopService(); cache1 = null; cache2 = null; } public void testPessTxSyncUnableToEvict() throws Exception
290291292293294295296297298299300
{ Assert.assertTrue("Ought to have succeeded!", false); } // clean up. cache1.stopService(); cache2.stopService(); cache1 = null; cache2 = null; } public void testPessTxAsyncUnableToEvict() throws Exception
5354555657585960616263
{ assertTrue(true); } assertEquals(null, dummy.getCalled()); cache.stopService(); } public void testNoTransactionGetMethod() throws Exception {
85868788899091929394
{ fail = true; } assertTrue(fail); assertEquals(null, dummy.getCalled()); cache.stopService(); } }
7071727374757677787980
} catch (RollbackException re) { Assert.assertTrue("Expecting a rollback exception!", true); } c.stopService(); } public void testImplicitTxFailure() throws Exception { final TreeCache c = createCache();