> +
> + DataCenter fetchedDc = api.getDataCenterApi().getDataCenter(dcId);
> +
> + assertNotNull(fetchedDc);
> + assertEquals(newName, fetchedDc.name());
> + }
> +
> + @Test(dependsOnMethods = "testUpdateDataCenter")
> + public void testClearDataCenter() {
> + DataCenter dataCenter = api.getDataCenterApi().clearDataCenter(dcId);
> +
> + assertNotNull(dataCenter);
> + }
> +
> + // FIXME Fails. see ProfitBricksHttpErrorHandler line 42
> + @Test(dependsOnMethods = "testClearDataCenter", expectedExceptions =
> ResourceNotFoundException.class)
Move the cleanup to an `@AfterClass(alwaysRun = true)` method to make sure it
is executed even if some test fails? This way we won't be accidentally leaking
resources.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs/pull/72/files#r22134631