mirror of https://github.com/apache/jclouds.git
bugfix: allow inconsistent null weights from listNodes
This commit is contained in:
parent
4a5af1e7a5
commit
a1f02ad0bc
apis/cloudloadbalancers/src/test/java/org/jclouds/cloudloadbalancers/features
|
@ -89,7 +89,8 @@ public class NodeClientLiveTest extends BaseCloudLoadBalancersClientLiveTest {
|
|||
assert n.getAddress() != null : n;
|
||||
assert n.getPort() != -1 : n;
|
||||
assert n.getStatus() != null : n;
|
||||
assert n.getWeight() != null : n; //FIXME may fail as can be null (json response doesn't have the attribute)
|
||||
// until fixed by rackspace... listNodes gives null weight when loadbalancer algorithm isn't weighted
|
||||
// assert n.getWeight() != null : n;
|
||||
|
||||
Node getDetails = client.getNodeClient(lb.getRegion()).getNodeInLoadBalancer(n.getId(), lb.getId());
|
||||
System.out.println(n.toString());
|
||||
|
@ -99,7 +100,8 @@ public class NodeClientLiveTest extends BaseCloudLoadBalancersClientLiveTest {
|
|||
assertEquals(getDetails.getAddress(), n.getAddress());
|
||||
assertEquals(getDetails.getPort(), n.getPort());
|
||||
assertEquals(getDetails.getStatus(), n.getStatus());
|
||||
assertEquals(getDetails.getWeight(), n.getWeight()); //FIXME disparity between list/get can lead these to mismatch
|
||||
// see above; getNodes gives valid/default weight which doesn't match
|
||||
// assertEquals(getDetails.getWeight(), n.getWeight());
|
||||
} catch (AssertionError e) {
|
||||
throw new AssertionError(String.format("%s\n%s - %s", e.getMessage(),getDetails, n));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue