public void testCloseInterruptsFlush() throws Exception { FlushCounter handler = new FlushCounter(); SortedOplogSetImpl sos = prepSoplogSet("closeDuringFlush"); sos.testDelayDuringFlush = new CountDownLatch(1); sos.flush(null, handler); sos.close(); assertTrue(sos.isClosed()); assertEquals(1, handler.flushes.get()); }
public void testDestroyInterruptsFlush() throws Exception { FlushCounter handler = new FlushCounter(); SortedOplogSetImpl sos = prepSoplogSet("destroyDuringFlush"); sos.testDelayDuringFlush = new CountDownLatch(1); sos.flush(null, handler); sos.destroy(); assertTrue(sos.isClosed()); assertEquals(1, handler.flushes.get()); }
public void testDestroy() throws IOException { set.destroy(); assertTrue(((SortedOplogSetImpl) set).isClosed()); try { set.scan(); fail(); } catch (IllegalStateException e) { } }
rwlock.writeLock().lock(); try { if (isClosed()) { handler.complete(); factory.getConfiguration().getStatistics().getFlush().end(0, start);