@AfterClass(groups = { "integration", "live" }) @Override protected void tearDownContext() { if (nodes != null) { testDestroyNodes(); } super.tearDownContext(); }
@AfterClass(groups = { "integration", "live" }) @Override protected void tearDownContext() { String keyName = PREFIX + "1"; try { client.deleteKeyPairInRegion(null, keyName); } catch (Exception e) { } super.tearDownContext(); }
@AfterClass(groups = { "integration", "live" }) @Override protected void tearDownContext() { try { cleanup(); } catch (Exception e) { } super.tearDownContext(); }
@Override @AfterClass(groups = { "integration", "live" }) public void tearDownContext() { try { if (vpc != null) { client.deleteVpc(null, vpc.id()); } } finally { super.tearDownContext(); } }
@Override @AfterClass(groups = { "integration", "live" }) protected void tearDownContext() { for (String imageId : imagesToDeregister) client.deregisterImageInRegion(regionId, imageId); for (String snapshotId : snapshotsToDelete) ec2Api.getElasticBlockStoreApi().get().deleteSnapshotInRegion(regionId, snapshotId); super.tearDownContext(); }
@Override @AfterClass(groups = { "integration", "live" }) protected void tearDownContext() { for (String imageId : imagesToDeregister) client.deregisterImageInRegion(regionId, imageId); for (String snapshotId : snapshotsToDelete) ec2Client.getElasticBlockStoreServices().deleteSnapshotInRegion(regionId, snapshotId); super.tearDownContext(); }
@AfterClass @Override protected void tearDownContext() { super.tearDownContext(); if (defaultImage != null) { imageApi().deleteImage(SSHABLE_IMAGE + ":" + SSHABLE_IMAGE_TAG, DeleteImageOptions.Builder.force(true)); } }
@Override @AfterClass(groups = { "integration", "live" }) protected void tearDownContext() { if (group != null) { client.getPlacementGroupApi().get().deletePlacementGroupInRegion(group.getRegion(), group.getName()); assert deletedTester.apply(group) : group; } super.tearDownContext(); }
@AfterClass(groups = { "integration", "live" }) @Override protected void tearDownContext() { try { if (nodes != null) { // Destroy all nodes in the group but also make sure to destroy other created nodes that might not be in it. // The "testCreateTwoNodesWithOneSpecifiedName" creates nodes with an explicit name that puts them outside the group, // so the list of nodes should also be taken into account when destroying the nodes. client.destroyNodesMatching(Predicates.<NodeMetadata> or(inGroup(group), (Predicate<NodeMetadata>) in(nodes))); } } catch (Exception e) { } super.tearDownContext(); }
@AfterClass(groups = { "integration", "live" }) @Override protected void tearDownContext() { try { client.deleteSnapshotInRegion(defaultRegion, snapshot.getId()); client.deleteVolumeInRegion(defaultRegion, volumeId); } catch (Exception e) { // we don't really care about any exception here, so just delete away. } super.tearDownContext(); }
@Override @AfterClass(groups = { "integration", "live" }) public void tearDownContext() { try { try { if (subnet != null) { subnetClient.deleteSubnetInRegion(region, subnet.getSubnetId()); } } finally { if (vpc != null) { vpcClient.deleteVpc(region, vpc.id()); } } } finally { super.tearDownContext(); } }
@AfterClass(groups = { "integration", "live" }) @Override protected void tearDownContext() { try { view.getComputeService().destroyNodesMatching(inGroup(imageGroup)); Optional<? extends Image> image = getImage(); if (image.isPresent() && image.get().getStatus() != Image.Status.DELETED) { Optional<ImageExtension> imageExtension = view.getComputeService().getImageExtension(); if (imageExtension.isPresent()) { imageExtension.get().deleteImage(image.get().getId()); } } } catch (Exception e) { // Any exception is most likely due to nodes/images not existing, which is the desired result // anyway, so discarding the exception. } super.tearDownContext(); } }
@Override @AfterClass(groups = { "integration", "live" }) protected void tearDownContext() { if (requests != null) { for (SpotInstanceRequest request : requests) client.getSpotInstanceApi().get().cancelSpotInstanceRequestsInRegion(request.getRegion(), request.getId()); // assert deletedTester.apply(request) : request; } if (instance != null) { client.getInstanceApi().get().terminateInstancesInRegion(instance.getRegion(), instance.getId()); } super.tearDownContext(); } }
@Override @AfterClass(alwaysRun = true) protected void tearDownContext() { try { view.getComputeService().destroyNodesMatching(inGroup(group)); } finally { try { URI uri = api.getResourceGroupApi().delete(group); assertResourceDeleted(uri); } finally { super.tearDownContext(); } } }
@AfterGroups(groups = "live") @Override protected void tearDownContext() { if (server != null) client.destroyServer(server.getUuid()); if (server != null) client.destroyDrive(drive.getUuid()); super.tearDownContext(); }
@Override @AfterClass(alwaysRun = true) protected void tearDownContext() { try { view.getComputeService().destroyNodesMatching(inGroup(group)); } finally { try { URI uri = api.getResourceGroupApi().delete(group); assertResourceDeleted(uri); } finally { super.tearDownContext(); } } }
@Override @AfterClass(alwaysRun = true) protected void tearDownContext() { try { view.getComputeService().destroyNodesMatching(inGroup(group)); } finally { try { URI uri = api.getResourceGroupApi().delete(group); assertResourceDeleted(uri); } finally { super.tearDownContext(); } } }
@Override @AfterClass(alwaysRun = true) protected void tearDownContext() { try { view.getComputeService().destroyNodesMatching(inGroup(group)); } finally { try { URI uri = api.getResourceGroupApi().delete(group); assertResourceDeleted(uri); } finally { super.tearDownContext(); } } }
@AfterGroups(groups = "live") @Override protected void tearDownContext() { try { client.destroyServer(server.getUuid()); } catch (Exception e) { // no need to check null or anything as we swallow all } try { client.destroyDrive(drive.getUuid()); } catch (Exception e) { } super.tearDownContext(); }
@AfterGroups(groups = "live") @Override protected void tearDownContext() { try { client.destroyServer(server.getUuid()); } catch (Exception e) { // no need to check null or anything as we swallow all } try { client.destroyDrive(drive.getUuid()); } catch (Exception e) { } super.tearDownContext(); }