private HttpHealthCheckBinderHelper(String name, HttpHealthCheckCreationOptions httpHealthCheckCreationOptions){ this.name = name; this.host = httpHealthCheckCreationOptions.host(); this.requestPath = httpHealthCheckCreationOptions.requestPath(); this.port = httpHealthCheckCreationOptions.port(); this.checkIntervalSec = httpHealthCheckCreationOptions.checkIntervalSec(); this.timeoutSec = httpHealthCheckCreationOptions.timeoutSec(); this.unhealthyThreshold = httpHealthCheckCreationOptions.unhealthyThreshold(); this.healthyThreshold = httpHealthCheckCreationOptions.healthyThreshold(); this.description = httpHealthCheckCreationOptions.description(); } }
private HttpHealthCheckBinderHelper(String name, HttpHealthCheckCreationOptions httpHealthCheckCreationOptions){ this.name = name; this.host = httpHealthCheckCreationOptions.host(); this.requestPath = httpHealthCheckCreationOptions.requestPath(); this.port = httpHealthCheckCreationOptions.port(); this.checkIntervalSec = httpHealthCheckCreationOptions.checkIntervalSec(); this.timeoutSec = httpHealthCheckCreationOptions.timeoutSec(); this.unhealthyThreshold = httpHealthCheckCreationOptions.unhealthyThreshold(); this.healthyThreshold = httpHealthCheckCreationOptions.healthyThreshold(); this.description = httpHealthCheckCreationOptions.description(); } }
private HttpHealthCheckBinderHelper(String name, HttpHealthCheckCreationOptions httpHealthCheckCreationOptions){ this.name = name; this.host = httpHealthCheckCreationOptions.host(); this.requestPath = httpHealthCheckCreationOptions.requestPath(); this.port = httpHealthCheckCreationOptions.port(); this.checkIntervalSec = httpHealthCheckCreationOptions.checkIntervalSec(); this.timeoutSec = httpHealthCheckCreationOptions.timeoutSec(); this.unhealthyThreshold = httpHealthCheckCreationOptions.unhealthyThreshold(); this.healthyThreshold = httpHealthCheckCreationOptions.healthyThreshold(); this.description = httpHealthCheckCreationOptions.description(); } }
private HttpHealthCheckBinderHelper(String name, HttpHealthCheckCreationOptions httpHealthCheckCreationOptions){ this.name = name; this.host = httpHealthCheckCreationOptions.host(); this.requestPath = httpHealthCheckCreationOptions.requestPath(); this.port = httpHealthCheckCreationOptions.port(); this.checkIntervalSec = httpHealthCheckCreationOptions.checkIntervalSec(); this.timeoutSec = httpHealthCheckCreationOptions.timeoutSec(); this.unhealthyThreshold = httpHealthCheckCreationOptions.unhealthyThreshold(); this.healthyThreshold = httpHealthCheckCreationOptions.healthyThreshold(); this.description = httpHealthCheckCreationOptions.description(); } }
@Test(groups = "live", dependsOnMethods = "testInsertHttpHealthCheck") public void testGetHttpHealthCheck() { HttpHealthCheck httpHealthCheck = api().get(HTTP_HEALTH_CHECK_NAME); assertNotNull(httpHealthCheck); assertEquals(httpHealthCheck.name(), HTTP_HEALTH_CHECK_NAME); assertEquals(httpHealthCheck.port(), options.port()); assertEquals(httpHealthCheck.checkIntervalSec(), options.checkIntervalSec()); assertEquals(httpHealthCheck.timeoutSec(), options.timeoutSec()); assertEquals(httpHealthCheck.healthyThreshold(), options.healthyThreshold()); assertEquals(httpHealthCheck.unhealthyThreshold(), options.unhealthyThreshold()); assertEquals(httpHealthCheck.description(), options.description()); }
@Test(groups = "live", dependsOnMethods = "testGetHttpHealthCheck") public void testPatchHttpHealthCheck() { HttpHealthCheckCreationOptions newOptions = new HttpHealthCheckCreationOptions.Builder() .port(options.port() + OFFSET) .checkIntervalSec(options.checkIntervalSec() + OFFSET) .timeoutSec(options.timeoutSec() + OFFSET) .buildForPatch(); assertOperationDoneSuccessfully(api().patch(HTTP_HEALTH_CHECK_NAME, newOptions)); // Check changes happened and others unchanged. HttpHealthCheck httpHealthCheck = api().get(HTTP_HEALTH_CHECK_NAME); assertNotNull(httpHealthCheck); assertEquals(httpHealthCheck.name(), HTTP_HEALTH_CHECK_NAME); assertEquals(httpHealthCheck.port(), newOptions.port()); assertEquals(httpHealthCheck.checkIntervalSec(), newOptions.checkIntervalSec()); assertEquals(httpHealthCheck.timeoutSec(), newOptions.timeoutSec()); assertEquals(httpHealthCheck.healthyThreshold(), options.healthyThreshold()); assertEquals(httpHealthCheck.unhealthyThreshold(), options.unhealthyThreshold()); assertEquals(httpHealthCheck.description(), options.description()); }