@Test public void testUnhealthy() throws Exception { when(dockerClient.ping()) .thenThrow(new DockerRequestException("GET", new URI("/ping"), 500, null, null)); final HealthCheck.Result result = sut.check(); assertThat(result.isHealthy(), is(false)); }
@Override protected Result check() throws Exception { try { dockerClient.ping(); return Result.healthy(); } catch (final Exception ex) { return Result.unhealthy(ex); } }
DockerDaemonHealthChecker extends HealthCheck { @Override protected Result check() throws Exception { try { dockerClient.ping(); return Result.healthy(); } catch (final Exception ex) { return Result.unhealthy(ex); } } }
DockerDaemonHealthChecker extends HealthCheck { @Override protected Result check() throws Exception { try { dockerClient.ping(); return Result.healthy(); } catch (final Exception ex) { return Result.unhealthy(ex); } } DockerDaemonHealthChecker(final DockerClient dockerClient); }
DockerDaemonHealthChecker extends HealthCheck { @Override protected Result check() throws Exception { try { dockerClient.ping(); return Result.healthy(); } catch (final Exception ex) { return Result.unhealthy(ex); } } DockerDaemonHealthChecker(final DockerClient dockerClient);  }
DockerDaemonHealthChecker extends HealthCheck { @Override protected Result check() throws Exception { try { dockerClient.ping(); return Result.healthy(); } catch (final Exception ex) { return Result.unhealthy(ex); } } DockerDaemonHealthChecker(final DockerClient dockerClient);   }