> +      assertTrue(powerOffEvent > 0, "The event id should not be null");
> +      waitForEvent(powerOffEvent);
> +
> +      int event = api.getDropletApi().snapshot(droplet.getId(), 
> "testsnapshot");
> +      assertTrue(event > 0, "The event id should not be null");
> +      waitForEvent(event);
> +
> +      Optional<Image> snapshot = tryFind(api.getImageApi().list(), new 
> Predicate<Image>() {
> +         @Override
> +         public boolean apply(Image input) {
> +            return input.getName().equals("testsnapshot");
> +         }
> +      });
> +
> +      assertTrue(snapshot.isPresent(), "The created snapshot should exist in 
> the image list");
> +      api.getImageApi().delete(snapshot.get().getId());

Got it :) Moving to the after class to avoid making a "delete" failure mark the 
test as failed

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

Reply via email to