>  
> +            assertTrue(foundIt, "Failed to find the attachment we set in 
> listAttachments() response");
> +
> +            
> volumeAttachmentApi.get().detachVolumeFromServer(testVolume.getId(), 
> serverId);
> +            assertTrue(retry(new Predicate<VolumeAttachmentApi>() {
> +               public boolean apply(VolumeAttachmentApi volumeAttachmentApi) 
> {
> +                  return 
> volumeAttachmentApi.listAttachmentsOnServer(serverId).size() == before - 1;
> +               }
> +            }, 60 * 1000L).apply(volumeAttachmentApi.get()));

This is not so easy to understand. Could we not simply wait here until the 
operation has completed and _then_ check that the size is "before - 1"?

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

Reply via email to