stop
107108109110111112113114115116117
// test exceptions. for (int i = 0; i < numThreads; i++) { Assert.assertNull("Thread " + thread[i].getName() + " threw exception!", thread[i].getException()); } c.stopService(); } public void testLocalTransaction() throws Exception {
673674675676677678679680681682683
// we should have 0 exceptions assertEquals(0, exceptions.size()); } finally { if (cache != null) cache.stopService(); } } public void testCacheContentionOnNode() throws Exception
734735736737738739740741742743
// we should have 0 exceptions assertEquals(0, exceptions.size()); } finally { if (cache != null) cache.stopService(); } } }
173174175176177178179180181182183
{ 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());
165166167168169170171172173174175
catch(Exception e) { fail(e.toString()); } finally { if(cache3 != null) cache3.stopService(); } } public void testStateTransfer() { TreeCache cache4=null;
184185186187188189190191192193194
fail(e.toString()); } finally { if(cache4 != null) { System.out.println("cache4's view: " + cache4.getMembers()); cache4.stopService(); } } }
344345346347348349350351352353354
{ Assert.assertTrue("Ought to have succeeded!", false); } // clean up. cache1.stopService(); cache2.stopService(); cache1 = null; cache2 = null; }
412413414415416417418419420421422
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; }
229230231232233234235236237238239
assertNoStaleLocks(caches); } finally { if (cache2 != null) cache2.stopService(); cleanup( caches ); } } public void testCompleteStateSurvival() throws Exception
6667686970717273747576
assertEquals(0, cache.getNumberOfLocksHeld()); } finally { cache.stopService(); } } /** * This one fails now.