> + 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());
Guess you want this to happen whether the test succeeds or fails? Put in an
AfterClass block?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/49/files#r9166501