demobox commented on this pull request.


> @@ -110,6 +122,27 @@ protected VirtualMachineInStatePredicateFactory 
> provideNodeSuspendedPredicate(fi
             timeouts.nodeTerminated, pollPeriod.pollInitialPeriod, 
pollPeriod.pollMaxPeriod);
    }
 
+   @Provides
+   @Named(TIMEOUT_RESOURCE_REMOVED)
+   protected Predicate<IdReference> provideResourceRemovedPredicate(final 
AzureComputeApi api, final ComputeServiceConstants.Timeouts timeouts,
+         final PollPeriod pollPeriod) {
+      long timeout = timeouts.nodeTerminated;
+      return retry(new Predicate<IdReference>() {
+         @Override
+         public boolean apply(final IdReference input) {
+            List<org.jclouds.azurecompute.arm.domain.Resource> 
attachedResources = api.getResourceGroupApi().resources(input.resourceGroup());
+            Optional<org.jclouds.azurecompute.arm.domain.Resource> 
resourceInGroup = Iterables.tryFind(attachedResources, new 
Predicate<org.jclouds.azurecompute.arm.domain.Resource>() {
+               @Override
+               public boolean 
apply(org.jclouds.azurecompute.arm.domain.Resource resource) {
+                  return resource.id().equalsIgnoreCase(input.id());

> So in short, yes, we should always use equalsIgnoreCase for safety

Thanks for explaining, @danielestevez! In that case, would it make sense to add 
a test for that as part of this PR?

-- 
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/pull/1240#discussion_r220679968

Reply via email to