@Test public void testDeployment() throws Exception { awsDeployment.start(); RetryPolicy retryPolicy = new RetryOneTime(1); try (CuratorFramework client = CuratorFrameworkFactory.newClient(zookeeper.getConnectString(), retryPolicy)) { client.start(); client.blockUntilConnected(); String path = "/test-path/i-1234567890abcdef0"; Thread.sleep(2000); assertNotNull(client.checkExists().forPath(path)); String data = new String(client.getData().forPath(path)); ObjectMapper objectMapper = new ObjectMapper(); DeploymentPayload payload = objectMapper.readValue(data, new TypeReference<DeploymentPayload>() {}); assertEquals("10.158.112.84", payload.getHost()); assertEquals(443, payload.getPort()); assertEquals("us-west-2b", payload.getAvailabilityZone()); } }
public void start() throws InterruptedException { curatorClient.start(); curatorClient.blockUntilConnected(); groupMember.start(); }
AwsDeployment { public void start() throws InterruptedException { curatorClient.start(); curatorClient.blockUntilConnected(); groupMember.start(); } }
AwsDeployment { public void start() throws InterruptedException { curatorClient.start(); curatorClient.blockUntilConnected(); groupMember.start(); } AwsDeployment(AwsDeploymentConfig config, int port); }
AwsDeployment { public void start() throws InterruptedException { curatorClient.start(); curatorClient.blockUntilConnected(); groupMember.start(); } AwsDeployment(AwsDeploymentConfig config, int port); void start(); void close(); }
AwsDeployment { public void start() throws InterruptedException { curatorClient.start(); curatorClient.blockUntilConnected(); groupMember.start(); } AwsDeployment(AwsDeploymentConfig config, int port); void start(); void close();  }