[java] Adding more waits to make DistributorTest stable
@@ -1148,7 +1148,8 @@ private void waitForAllNodesToHaveCapacity(Distributor distributor, int nodeCoun
.pollingEvery(Duration.ofMillis(100))
.until(d -> {
Set<NodeStatus> nodes = d.getStatus().getNodes();
- return nodes.size() == nodeCount && nodes.stream().allMatch(NodeStatus::hasCapacity);
+ return nodes.size() == nodeCount && nodes.stream().allMatch(
+ node -> node.getAvailability() == UP && node.hasCapacity());
});
} catch (TimeoutException ex) {
Set<NodeStatus> nodes = distributor.getStatus().getNodes();
