@Test public void testNotStarted() { clock.setTime(idleTimeMs - 1); watchdog.run(); Assert.assertNull(call.cancelMessage); clock.setTime(idleTimeMs); watchdog.run(); Assert.assertNotNull(call.cancelMessage); call.listener.onClose( Status.CANCELLED.withDescription("Some upstream exception representing cancellation"), new Metadata()); Assert.assertEquals( listener.closeStatus.getDescription(), "Some upstream exception representing cancellation"); }
public void run() { try { runUnsafe(); } catch (Throwable t) { LOG.error("Caught throwable in periodic Watchdog run. Continuing.", t); } }
Watchdog implements Runnable { public void run() { try { runUnsafe(); } catch (Throwable t) { LOG.error("Caught throwable in periodic Watchdog run. Continuing.", t); } } }
Watchdog implements Runnable { public void run() { try { runUnsafe(); } catch (Throwable t) { LOG.error("Caught throwable in periodic Watchdog run. Continuing.", t); } } Watchdog(Clock clock, long waitTimeoutMs);  Watchdog(Clock clock, long waitTimeoutMs, long idleTimeoutMs); }
Watchdog implements Runnable { public void run() { try { runUnsafe(); } catch (Throwable t) { LOG.error("Caught throwable in periodic Watchdog run. Continuing.", t); } } Watchdog(Clock clock, long waitTimeoutMs);  Watchdog(Clock clock, long waitTimeoutMs, long idleTimeoutMs); ClientCall<ReqT, RespT> watch(ClientCall<ReqT, RespT> innerCall); void run(); void start(ScheduledExecutorService executor); void stop(); }
Watchdog implements Runnable { public void run() { try { runUnsafe(); } catch (Throwable t) { LOG.error("Caught throwable in periodic Watchdog run. Continuing.", t); } } Watchdog(Clock clock, long waitTimeoutMs);  Watchdog(Clock clock, long waitTimeoutMs, long idleTimeoutMs); ClientCall<ReqT, RespT> watch(ClientCall<ReqT, RespT> innerCall); void run(); void start(ScheduledExecutorService executor); void stop();  }