nacx commented on this pull request.
Just one minor comment regarding the live test cleanup.
> + .credentials(identity, credential)
+ .buildView(typeToken(EC2ComputeServiceContext.class));
+
+ ec2Api = ec2ComputeServiceContext.unwrapApi(EC2Api.class);
+
+ }
+
+ private void createTestLoadBalancer (){
+ api.getLoadBalancerApi().createListeningInAvailabilityZones(loadBalancerName, Listener.builder()
+ .protocol(Protocol.HTTP)
+ .port(80)
+ .instanceProtocol(Protocol.HTTP)
+ .instancePort(80)
+ .build(), ImmutableList.of("us-east-1b"));
+ }
+ @AfterClass
Better use `@AfterClass(alwaysRun = true)`, to make sure the cleanup happens even if tests
fail. This way we do a best effort to avoid leaking resources generated during the tests.
Apply this to the other created live test classes that can benefit from this pattern.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-aws/pull/70#pullrequestreview-18398900
|