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/08/16 07:39:29 UTC
lucene-solr:master: SOLR-11243: Fix for the
AutoScalingHandlerTest.testReadApi
Repository: lucene-solr
Updated Branches:
refs/heads/master ae43ffe35 -> 8d8c62942
SOLR-11243: Fix for the AutoScalingHandlerTest.testReadApi
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/8d8c6294
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/8d8c6294
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/8d8c6294
Branch: refs/heads/master
Commit: 8d8c629425d2f0369c08d34baf48654dd5326b0a
Parents: ae43ffe
Author: Shalin Shekhar Mangar <sh...@apache.org>
Authored: Wed Aug 16 13:09:20 2017 +0530
Committer: Shalin Shekhar Mangar <sh...@apache.org>
Committed: Wed Aug 16 13:09:20 2017 +0530
----------------------------------------------------------------------
.../solr/cloud/autoscaling/AutoScalingHandlerTest.java | 12 ++++++++++++
1 file changed, 12 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/8d8c6294/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 9250e8c..c752253 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
@@ -284,12 +284,24 @@ public class AutoScalingHandlerTest extends SolrCloudTestCase {
assertNotNull(violations);
assertEquals(0, violations.size());
+ String setEmptyClusterPolicyCommand = "{" +
+ " 'set-cluster-policy': []" +
+ "}";
+ req = createAutoScalingRequest(SolrRequest.METHOD.POST, setEmptyClusterPolicyCommand);
+ response = solrClient.request(req);
+ assertEquals(response.get("result").toString(), "success");
+
// lets create a collection which violates the rule replicas < 2
CollectionAdminRequest.Create create = CollectionAdminRequest.Create.createCollection("readApiTestViolations", CONFIGSET_NAME, 1, 6);
create.setMaxShardsPerNode(10);
CollectionAdminResponse adminResponse = create.process(solrClient);
assertTrue(adminResponse.isSuccess());
+ // reset the original cluster policy
+ req = createAutoScalingRequest(SolrRequest.METHOD.POST, setClusterPolicyCommand);
+ response = solrClient.request(req);
+ assertEquals(response.get("result").toString(), "success");
+
// get the diagnostics output again
req = createAutoScalingRequest(SolrRequest.METHOD.GET, "/diagnostics", null);
response = solrClient.request(req);