mirror of https://github.com/apache/lucene.git
SOLR-10406: Remove workaround for SOLR-10768
This commit is contained in:
parent
c66a8d9fda
commit
5d442437b5
|
@ -26,7 +26,6 @@ import java.util.Map;
|
||||||
import org.apache.solr.client.solrj.SolrClient;
|
import org.apache.solr.client.solrj.SolrClient;
|
||||||
import org.apache.solr.client.solrj.SolrRequest;
|
import org.apache.solr.client.solrj.SolrRequest;
|
||||||
import org.apache.solr.client.solrj.SolrResponse;
|
import org.apache.solr.client.solrj.SolrResponse;
|
||||||
import org.apache.solr.client.solrj.SolrServerException;
|
|
||||||
import org.apache.solr.client.solrj.impl.CloudSolrClient;
|
import org.apache.solr.client.solrj.impl.CloudSolrClient;
|
||||||
import org.apache.solr.client.solrj.impl.HttpSolrClient;
|
import org.apache.solr.client.solrj.impl.HttpSolrClient;
|
||||||
import org.apache.solr.client.solrj.request.CollectionAdminRequest;
|
import org.apache.solr.client.solrj.request.CollectionAdminRequest;
|
||||||
|
@ -82,20 +81,9 @@ public class AutoScalingHandlerTest extends SolrCloudTestCase {
|
||||||
try {
|
try {
|
||||||
solrClient.request(req);
|
solrClient.request(req);
|
||||||
fail("Adding a policy with 'cores' attribute should not have succeeded.");
|
fail("Adding a policy with 'cores' attribute should not have succeeded.");
|
||||||
} catch (SolrServerException e) {
|
|
||||||
// todo one of these catch blocks should not be needed after SOLR-10768
|
|
||||||
if (e.getRootCause() instanceof HttpSolrClient.RemoteSolrException) {
|
|
||||||
HttpSolrClient.RemoteSolrException rootCause = (HttpSolrClient.RemoteSolrException) e.getRootCause();
|
|
||||||
// expected
|
|
||||||
assertTrue(rootCause.getMessage().contains("cores is only allowed in 'cluster-policy'"));
|
|
||||||
} else {
|
|
||||||
throw e;
|
|
||||||
}
|
|
||||||
} catch (HttpSolrClient.RemoteSolrException e) {
|
} catch (HttpSolrClient.RemoteSolrException e) {
|
||||||
// expected
|
// expected
|
||||||
assertTrue(e.getMessage().contains("cores is only allowed in 'cluster-policy'"));
|
assertTrue(e.getMessage().contains("cores is only allowed in 'cluster-policy'"));
|
||||||
} catch (Exception e) {
|
|
||||||
throw e;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
setPolicyCommand = "{'set-policy': {" +
|
setPolicyCommand = "{'set-policy': {" +
|
||||||
|
|
Loading…
Reference in New Issue