@Test void testUnhealthy() { final Dataset dataset = rdf.createDataset(); final RDFConnection rdfConnection = connect(wrap(toJena(dataset))); rdfConnection.close(); final HealthCheck check = new TriplestoreHealthCheck(rdfConnection); assertEquals(HealthCheckResponse.State.DOWN, check.call().getState(), "Closed RDFConnection doesn't report as unhealthy!"); }
@Override public HealthCheckResponse call() { return HealthCheckResponse.named(TriplestoreHealthCheck.class.getSimpleName()) .state(rdfConnection != null && !rdfConnection.isClosed()).build(); }
TriplestoreHealthCheck implements HealthCheck { @Override public HealthCheckResponse call() { return HealthCheckResponse.named(TriplestoreHealthCheck.class.getSimpleName()) .state(rdfConnection != null && !rdfConnection.isClosed()).build(); } }
TriplestoreHealthCheck implements HealthCheck { @Override public HealthCheckResponse call() { return HealthCheckResponse.named(TriplestoreHealthCheck.class.getSimpleName()) .state(rdfConnection != null && !rdfConnection.isClosed()).build(); } TriplestoreHealthCheck(); @Inject  TriplestoreHealthCheck(final RDFConnection rdfConnection); }
TriplestoreHealthCheck implements HealthCheck { @Override public HealthCheckResponse call() { return HealthCheckResponse.named(TriplestoreHealthCheck.class.getSimpleName()) .state(rdfConnection != null && !rdfConnection.isClosed()).build(); } TriplestoreHealthCheck(); @Inject  TriplestoreHealthCheck(final RDFConnection rdfConnection); @Override HealthCheckResponse call(); }
TriplestoreHealthCheck implements HealthCheck { @Override public HealthCheckResponse call() { return HealthCheckResponse.named(TriplestoreHealthCheck.class.getSimpleName()) .state(rdfConnection != null && !rdfConnection.isClosed()).build(); } TriplestoreHealthCheck(); @Inject  TriplestoreHealthCheck(final RDFConnection rdfConnection); @Override HealthCheckResponse call();  }