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 05:19:37 UTC

[26/27] lucene-solr:feature/autoscaling: SOLR-10406: Remove workaround for SOLR-10768

SOLR-10406: Remove workaround for SOLR-10768


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

Branch: refs/heads/feature/autoscaling
Commit: 5d442437b54961930ce503596ad8c3e0e926e5c5
Parents: c66a8d9
Author: Shalin Shekhar Mangar <sh...@apache.org>
Authored: Tue Jun 27 10:09:30 2017 +0530
Committer: Shalin Shekhar Mangar <sh...@apache.org>
Committed: Tue Jun 27 10:09:44 2017 +0530

----------------------------------------------------------------------
 .../solr/cloud/autoscaling/AutoScalingHandlerTest.java  | 12 ------------
 1 file changed, 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/5d442437/solr/core/src/test/org/apache/solr/cloud/autoscaling/AutoScalingHandlerTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/autoscaling/AutoScalingHandlerTest.java b/solr/core/src/test/org/apache/solr/cloud/autoscaling/AutoScalingHandlerTest.java
index ecc7afd..197801a 100644
--- a/solr/core/src/test/org/apache/solr/cloud/autoscaling/AutoScalingHandlerTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/autoscaling/AutoScalingHandlerTest.java
@@ -26,7 +26,6 @@ import java.util.Map;
 import org.apache.solr.client.solrj.SolrClient;
 import org.apache.solr.client.solrj.SolrRequest;
 import org.apache.solr.client.solrj.SolrResponse;
-import org.apache.solr.client.solrj.SolrServerException;
 import org.apache.solr.client.solrj.impl.CloudSolrClient;
 import org.apache.solr.client.solrj.impl.HttpSolrClient;
 import org.apache.solr.client.solrj.request.CollectionAdminRequest;
@@ -82,20 +81,9 @@ public class AutoScalingHandlerTest extends SolrCloudTestCase {
     try {
       solrClient.request(req);
       fail("Adding a policy with 'cores' attribute should not have succeeded.");
-    } catch (SolrServerException e) {
-      // todo one of these catch blocks should not be needed after SOLR-10768
-      if (e.getRootCause() instanceof HttpSolrClient.RemoteSolrException) {
-        HttpSolrClient.RemoteSolrException rootCause = (HttpSolrClient.RemoteSolrException) e.getRootCause();
-        // expected
-        assertTrue(rootCause.getMessage().contains("cores is only allowed in 'cluster-policy'"));
-      } else  {
-        throw e;
-      }
     } catch (HttpSolrClient.RemoteSolrException e)  {
       // expected
       assertTrue(e.getMessage().contains("cores is only allowed in 'cluster-policy'"));
-    } catch (Exception e) {
-      throw e;
     }
 
     setPolicyCommand =  "{'set-policy': {" +