CloudSolrServer solrServer,
boolean verbose,
boolean failOnTimeout,
int timeoutSeconds) throws Exception {
LOG.info("Entering solr wait with timeout " + timeoutSeconds);
ZkStateReader zkStateReader = solrServer.getZkStateReader();
try {
boolean cont = true;
int cnt = 0;
while (cont) {
if (verbose) LOG.debug("-");
boolean sawLiveRecovering = false;
zkStateReader.updateClusterState(true);
ClusterState clusterState = zkStateReader.getClusterState();
Map<String, Slice> slices = clusterState.getSlicesMap(collection);
assertNotNull("Could not find collection:" + collection, slices);
for (Map.Entry<String, Slice> entry : slices.entrySet()) {
Map<String, Replica> shards = entry.getValue().getReplicasMap();
for (Map.Entry<String, Replica> shard : shards.entrySet()) {