> @@ -101,6 +102,15 @@ public void setUpResourcesForAllThreads(ITestContext 
> testContext) throws Excepti
>        view.close();
>        view = null;
>     }
> +
> +   @AfterSuite(groups = { "integration", "live" })
> +   protected void destroyResources() throws Exception {
> +      setupContext();
> +      deleteEverything(view);
> +
> +      view.close();
> +      view = null;

Would it make sense to extract a "doWithContext(Callable...)" or Runnable or 
whatever here, that additionally wraps a `try {...} finally...` around the 
operation to be performed?

I guess in both BeforeSuite and AfterSuite, we'd want to close and null out the 
view even if the operation itself (e.g. "deleteEverything" in the AfterSuite 
case) fails..?

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

Reply via email to