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