Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

SOLR-12739: Clear all collections in TestCollectionStateWatchers setup so that the collections created by test methods are spread evenly in the cluster.

Shalin Shekhar Mangaraa0a5289e692
diff --git a/solr/solrj/src/test/org/apache/solr/common/cloud/TestCollectionStateWatchers.java b/solr/solrj/src/test/org/apache/solr/common/cloud/TestCollectionStateWatchers.java
index 51ee814d269..63f7b3e5712 100644
--- a/solr/solrj/src/test/org/apache/solr/common/cloud/TestCollectionStateWatchers.java
+++ b/solr/solrj/src/test/org/apache/solr/common/cloud/TestCollectionStateWatchers.java
@@ -62,6 +62,7 @@ public class TestCollectionStateWatchers extends SolrCloudTestCase {
@Before
public void prepareCluster() throws Exception {
+ cluster.deleteAllCollections();
int missingServers = CLUSTER_SIZE - cluster.getJettySolrRunners().size();
for (int i = 0; i < missingServers; i++) {
cluster.startJettySolrRunner();