mirror of https://github.com/apache/jclouds.git
check for deleted status before deleting to prevent spurious failures
This commit is contained in:
parent
6365190448
commit
3db6c66b1e
|
@ -68,8 +68,11 @@ public class NodeClientLiveTest extends BaseCloudLoadBalancersClientLiveTest {
|
||||||
protected void tearDown() {
|
protected void tearDown() {
|
||||||
for (Entry<LoadBalancer, Set<Node>> entry : nodes.entrySet()) {
|
for (Entry<LoadBalancer, Set<Node>> entry : nodes.entrySet()) {
|
||||||
LoadBalancer lb = entry.getKey();
|
LoadBalancer lb = entry.getKey();
|
||||||
|
LoadBalancerClient lbClient = client.getLoadBalancerClient(lb.getRegion());
|
||||||
|
|
||||||
client.getLoadBalancerClient(lb.getRegion()).removeLoadBalancer(lb.getId());
|
if(lbClient.getLoadBalancer(lb.getId()).getStatus() != Status.DELETED) {
|
||||||
|
lbClient.removeLoadBalancer(lb.getId());
|
||||||
|
}
|
||||||
assert loadBalancerDeleted.apply(lb) : lb;
|
assert loadBalancerDeleted.apply(lb) : lb;
|
||||||
}
|
}
|
||||||
super.tearDown();
|
super.tearDown();
|
||||||
|
|
Loading…
Reference in New Issue