Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

tests: fix - only do this check if there are actually different docs

Mark Robert Millerfc4ed67dc2db
diff --git a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java
index 036bc7d61d0..2f82670d089 100644
--- a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java
+++ b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java
@@ -1018,13 +1018,15 @@ public abstract class AbstractFullDistribZkTestBase extends AbstractDistribZkTes
Set<Map> differences = showDiff(controlDocList, cloudDocList,"controlDocList","cloudDocList");
// get versions for the mismatched ids
+ boolean foundId = false;
StringBuilder ids = new StringBuilder("id:(");
for (Map doc : differences) {
ids.append(" "+doc.get("id"));
+ foundId = true;
}
ids.append(")");
- if (ids.length() > 0) {
+ if (foundId) {
// get versions for those ids that don't match
q = params("q", ids.toString(), "rows", "100000", "fl", "id,_version_",
"sort", "id asc", "tests",