for (Slice slice : slices) {
Collection<Replica> replicas = slice.getReplicas();
long found = -1;
for (Replica replica : replicas) {
HttpSolrServer client = new HttpSolrServer(
new ZkCoreNodeProps(replica).getCoreUrl());
SolrQuery query = new SolrQuery("*:*");
query.set("distrib", false);
QueryResponse replicaResults = client.query(query);
long count = replicaResults.getResults().getNumFound();
if (found != -1) {
assertEquals(slice.getName() + " is inconsistent "
+ new ZkCoreNodeProps(replica).getCoreUrl(), found, count);
}
found = count;
}
}
}