noblepaul commented on a change in pull request #1598:
URL: https://github.com/apache/lucene-solr/pull/1598#discussion_r444575124



##########
File path: 
solr/solrj/src/test/org/apache/solr/client/solrj/cloud/autoscaling/TestPolicy2.java
##########
@@ -516,6 +517,16 @@ public void testInfiniteLoop() {
     System.out.println(suggestions);
   }
 
+  public void testAddTooManyPerPolicy() {
+    Map<String, Object> m = (Map<String, Object>) 
loadFromResource("testAddTooManyPerPolicy.json");
+    SolrCloudManager cloudManagerFromDiagnostics = 
createCloudManagerFromDiagnostics(m);
+    AutoScalingConfig autoScalingConfig = new AutoScalingConfig((Map<String, 
Object>) getObjectByPath(m, false, "diagnostics/config"));
+    SolrException exp =  expectThrows(SolrException.class, () -> 
PolicyHelper.getReplicaLocations("TooManyPerPolicy", autoScalingConfig, 
cloudManagerFromDiagnostics,
+            EMPTY_MAP, Collections.singletonList("shard1"), 1, 0, 0, null));
+    assertTrue(exp.getMessage().contains("No node can satisfy the rules"));

Review comment:
       what's the difference?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org
For additional commands, e-mail: issues-h...@lucene.apache.org

Reply via email to