lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sha...@apache.org
Subject [12/31] lucene-solr:feature/autoscaling: SOLR-11243: Fix for the AutoScalingHandlerTest.testReadApi
Date Sat, 19 Aug 2017 12:29:27 GMT
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/feature/autoscaling
Commit: 8d8c629425d2f0369c08d34baf48654dd5326b0a
Parents: ae43ffe
Author: Shalin Shekhar Mangar <shalin@apache.org>
Authored: Wed Aug 16 13:09:20 2017 +0530
Committer: Shalin Shekhar Mangar <shalin@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);


Mime
View raw message