You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sh...@apache.org on 2017/06/27 08:16:33 UTC

lucene-solr:feature/autoscaling: SOLR-10496: Fix test failure in testNodeAdded which happens if testNodeLost runs first and leaves behind a collection

Repository: lucene-solr
Updated Branches:
  refs/heads/feature/autoscaling cecd365f8 -> 4ae91b21e


SOLR-10496: Fix test failure in testNodeAdded which happens if testNodeLost runs first and leaves behind a collection


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/4ae91b21
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/4ae91b21
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/4ae91b21

Branch: refs/heads/feature/autoscaling
Commit: 4ae91b21e348444ed59ef33c23f6d75a3583d14a
Parents: cecd365
Author: Shalin Shekhar Mangar <sh...@apache.org>
Authored: Tue Jun 27 13:46:19 2017 +0530
Committer: Shalin Shekhar Mangar <sh...@apache.org>
Committed: Tue Jun 27 13:46:19 2017 +0530

----------------------------------------------------------------------
 .../solr/cloud/autoscaling/ComputePlanActionTest.java   | 12 ++++++++++++
 1 file changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/4ae91b21/solr/core/src/test/org/apache/solr/cloud/autoscaling/ComputePlanActionTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/autoscaling/ComputePlanActionTest.java b/solr/core/src/test/org/apache/solr/cloud/autoscaling/ComputePlanActionTest.java
index 6deaa71..2d19023 100644
--- a/solr/core/src/test/org/apache/solr/cloud/autoscaling/ComputePlanActionTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/autoscaling/ComputePlanActionTest.java
@@ -81,6 +81,18 @@ public class ComputePlanActionTest extends SolrCloudTestCase {
     zkClient().setData(ZkStateReader.SOLR_AUTOSCALING_CONF_PATH, "{}".getBytes(Charsets.UTF_8), true);
 
     CloudSolrClient solrClient = cluster.getSolrClient();
+
+    try {
+      CollectionAdminRequest.deleteCollection("testNodeLost").process(solrClient);
+    } catch (Exception e) {
+      // expected if testNodeLost hasn't run already
+    }
+    try {
+      CollectionAdminRequest.deleteCollection("testNodeAdded").process(solrClient);
+    } catch (Exception e) {
+      // expected if testNodeAdded hasn't run already
+    }
+
     String setClusterPolicyCommand = "{" +
         " 'set-cluster-policy': [" +
         "      {'cores':'<10', 'node':'#ANY'}," +