> +      assertPosted(DEFAULT_REGION, 
> "Action=DescribePlacementGroups&GroupName.1=jclouds%23sg-3c6ef654%23us-east-1");
> +      assertPosted(DEFAULT_REGION, 
> "Action=DeletePlacementGroup&GroupName=jclouds%23sg-3c6ef654%23us-east-1");
> +      assertPosted(DEFAULT_REGION, 
> "Action=DescribePlacementGroups&GroupName.1=jclouds%23sg-3c6ef654%23us-east-1");
> +   }
> +
> +   public void 
> deleteIncidentalResourcesGivingDependencyViolationForSecurityGroup() throws 
> Exception {
> +      
> runDeleteIncidentalResourcesGivingErrForSecurityGroup("DependencyViolation");
> +   }
> +   
> +   public void deleteIncidentalResourcesGivingInUseForSecurityGroup() throws 
> Exception {
> +      
> runDeleteIncidentalResourcesGivingErrForSecurityGroup("InvalidGroup.InUse");
> +   }
> +   
> +   protected void 
> runDeleteIncidentalResourcesGivingErrForSecurityGroup(String errCode) throws 
> Exception {
> +      // Complicated dispatcher is needed because cleanUpIncidentalResources 
> will retry an unpredictable 
> +      // number of times (because it is time-based, for 3 seconds - not 
> configurable).

If the hardcoded retry policy is an issue here, and it is demonstrated that 
might not be convenient when dealing with eventual consistency, should it be 
better be refactored to read those values from properties (or make the entire 
predicate injectable, or whatever) so users can customize it and we can add a 
better test?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/629/files#r22459827

Reply via email to