@Override public String get() { return serviceName() + " " + state(); } }
@Override public String toString() { return serviceName() + " [" + state() + "]"; }
@Override public String get() { return serviceName() + " " + state(); } }
@Override public String toString() { return serviceName() + " [" + state() + "]"; }
@Override public String get() { return serviceName() + " " + state(); } }
@Override public String toString() { return serviceName() + " [" + state() + "]"; }
public void testStart_failed() throws Exception { final Exception exception = new Exception("deliberate"); AbstractIdleService service = new DefaultService() { @Override protected void startUp() throws Exception { throw exception; } }; try { service.startAsync().awaitRunning(); fail(); } catch (RuntimeException e) { assertThat(e).hasCauseThat().isSameAs(exception); } assertEquals(Service.State.FAILED, service.state()); }
public void testStop_failed() throws Exception { final Exception exception = new Exception("deliberate"); AbstractIdleService service = new DefaultService() { @Override protected void shutDown() throws Exception { throw exception; } }; service.startAsync().awaitRunning(); try { service.stopAsync().awaitTerminated(); fail(); } catch (RuntimeException e) { assertThat(e).hasCauseThat().isSameAs(exception); } assertEquals(Service.State.FAILED, service.state()); } }
@Override public String get() { return serviceName() + " " + state(); } }
@Override public String get() { return serviceName() + " " + state(); } }
@Override public String toString() { return serviceName() + " [" + state() + "]"; }
@Override public String get() { return serviceName() + " " + state(); } }
@Override public String get() { return serviceName() + " " + state(); } };
@Override public String get() { return serviceName() + " " + state(); } };
@Override public String get() { return serviceName() + " " + state(); } };
@Override public String toString() { return serviceName() + " [" + state() + "]"; }
@Override public String get() { return serviceName() + " " + state(); } };
@Override public String toString() { return serviceName() + " [" + state() + "]"; }