case "http": if (member.getValue() instanceof String) { obj.setHttp((String)member.getValue());
@Test public void httpCheckLifecycle() { HttpHealthReporter reporter = new HttpHealthReporter(vertx); CheckOptions opts = new CheckOptions() .setHttp("http://localhost:" + reporter.port()) .setInterval("2s") .setName("checkName"); String checkId = createCheck(opts); sleep(vertx, 3000); Check check = getCheckInfo(checkId); assertEquals(CheckStatus.PASSING, check.getStatus()); reporter.setStatus(CheckStatus.WARNING); sleep(vertx, 3000); check = getCheckInfo(checkId); assertEquals(CheckStatus.WARNING, check.getStatus()); reporter.setStatus(CheckStatus.CRITICAL); sleep(vertx, 3000); check = getCheckInfo(checkId); assertEquals(CheckStatus.CRITICAL, check.getStatus()); reporter.close(); runAsync(h -> ctx.writeClient().deregisterCheck(checkId, h)); }