timeoutInjector.complete(); return null;
/** * Demonstrate TimeoutExceptionInjector semantics -- completion means no more exceptions passed to * error listener. */ @Test public void testStartAfterComplete() throws InterruptedException { final long time = 10; ForeignExceptionListener listener = Mockito.mock(ForeignExceptionListener.class); TimeoutExceptionInjector timer = new TimeoutExceptionInjector(listener, time); timer.complete(); try { timer.start(); fail("Timer should fail to start after complete."); } catch (IllegalStateException e) { LOG.debug("Correctly failed timer: " + e.getMessage()); } Thread.sleep(time + 1); Mockito.verifyZeroInteractions(listener); }
executionTimeoutTimer.complete(); complete = true; LOG.debug("Subprocedure '" + barrierName + "' completed.");
timeoutInjector.complete(); return null;
executionTimeoutTimer.complete(); complete = true; LOG.debug("Subprocedure '" + barrierName + "' completed.");
/** * Demonstrate TimeoutExceptionInjector semantics -- completion means no more exceptions passed to * error listener. */ @Test public void testStartAfterComplete() throws InterruptedException { final long time = 10; ForeignExceptionListener listener = Mockito.mock(ForeignExceptionListener.class); TimeoutExceptionInjector timer = new TimeoutExceptionInjector(listener, time); timer.complete(); try { timer.start(); fail("Timer should fail to start after complete."); } catch (IllegalStateException e) { LOG.debug("Correctly failed timer: " + e.getMessage()); } Thread.sleep(time + 1); Mockito.verifyZeroInteractions(listener); }
timeoutInjector.complete();
timeoutInjector.complete(); return null;
executionTimeoutTimer.complete(); complete = true; LOG.debug("Subprocedure '" + barrierName + "' completed.");