SOLR-10923: AutoScalingHandlerTest.testPolicyAndPreferences() failure: Adding a policy with 'cores' attribute should not have succeeded

This commit is contained in:
Cao Manh Dat 2017-06-21 09:53:23 +07:00
parent 1a58412e4a
commit 2d26d7e871
1 changed files with 2 additions and 1 deletions

View File

@ -80,7 +80,8 @@ public class AutoScalingHandlerTest extends SolrCloudTestCase {
NamedList<Object> response = null;
try {
response = solrClient.request(req);
fail("Adding a policy with 'cores' attribute should not have succeeded.");
String errorMsg = (String) ((NamedList)response.get("error")).get("msg");
assertTrue(errorMsg.contains("cores is only allowed in 'cluster-policy'"));
} catch (SolrServerException e) {
// todo one of these catch blocks should not be needed after SOLR-10768
if (e.getRootCause() instanceof HttpSolrClient.RemoteSolrException) {