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 2018/07/23 08:25:38 UTC

lucene-solr:jira/solr-11990: SOLR-11990: Added asserts on the nodes that should be selected by the add replica suggester

Repository: lucene-solr
Updated Branches:
  refs/heads/jira/solr-11990 4824933fd -> acbf4a693


SOLR-11990: Added asserts on the nodes that should be selected by the add replica suggester


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

Branch: refs/heads/jira/solr-11990
Commit: acbf4a69321e16cff11cc7cf0a1f076fd9ac0037
Parents: 4824933
Author: Shalin Shekhar Mangar <sh...@apache.org>
Authored: Mon Jul 23 13:55:30 2018 +0530
Committer: Shalin Shekhar Mangar <sh...@apache.org>
Committed: Mon Jul 23 13:55:30 2018 +0530

----------------------------------------------------------------------
 .../apache/solr/client/solrj/cloud/autoscaling/TestPolicy.java | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/acbf4a69/solr/solrj/src/test/org/apache/solr/client/solrj/cloud/autoscaling/TestPolicy.java
----------------------------------------------------------------------
diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/cloud/autoscaling/TestPolicy.java b/solr/solrj/src/test/org/apache/solr/client/solrj/cloud/autoscaling/TestPolicy.java
index f766ad5..6375222 100644
--- a/solr/solrj/src/test/org/apache/solr/client/solrj/cloud/autoscaling/TestPolicy.java
+++ b/solr/solrj/src/test/org/apache/solr/client/solrj/cloud/autoscaling/TestPolicy.java
@@ -246,8 +246,8 @@ public class TestPolicy extends SolrTestCaseJ4 {
 
     Map policies = (Map) Utils.fromJSONString("{" +
         "  'cluster-preferences': [" +
-        "    { 'maximize': 'freedisk', 'precision': 50}," +
-        "    { 'minimize': 'cores'}" +
+        "    { 'minimize': 'cores'}," +
+        "    { 'maximize': 'freedisk', 'precision': 50}" +
         "  ]," +
         "  'cluster-policy': [" +
         "    { 'replica': 0, 'nodeRole': 'overseer'}" +
@@ -280,6 +280,8 @@ public class TestPolicy extends SolrTestCaseJ4 {
     assertNotNull(op);
     nodes.add(op.getParams().get("node"));
     assertEquals(2, nodes.size());
+    assertTrue("node1 should have been selected by add replica", nodes.contains("node1"));
+    assertTrue("node2 should have been selected by add replica", nodes.contains("node2"));
 
     session = suggester.getSession();
     suggester = session.getSuggester(MOVEREPLICA);