> +      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).

I understand what you mean, but given that you've had to struggle with this 
test to make it work with the current implementation (because it is not a good 
one), I think it is reasonable to propose to fix and improve the code as soon 
as we find ourselves having to workaround it.

I know this might not be directly related to the change in the error parser, 
but if we just *fix stuff* without trying to make the related code better, 
we'll just be growing the codebase in a way that will make it harder to 
maintain and evolve in the future. In this case, there is just a test that 
calls code that is not test friendly. Instead of making the test complex, it is 
better to fix that code, as it should be pretty straightforward.

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

Reply via email to