use of org.apache.solr.client.solrj.response.CollectionAdminResponse in project lucene-solr by apache.
the class CollectionsAPISolrJTest method testOverseerStatus.
@Test
public void testOverseerStatus() throws IOException, SolrServerException {
CollectionAdminResponse response = new CollectionAdminRequest.OverseerStatus().process(cluster.getSolrClient());
assertEquals(0, response.getStatus());
assertNotNull("overseer_operations shouldn't be null", response.getResponse().get("overseer_operations"));
}
use of org.apache.solr.client.solrj.response.CollectionAdminResponse in project lucene-solr by apache.
the class DeleteStatusTest method testDeletingNonExistentRequests.
@Test
public void testDeletingNonExistentRequests() throws Exception {
final CloudSolrClient client = cluster.getSolrClient();
CollectionAdminResponse rsp = CollectionAdminRequest.deleteAsyncId("foo").process(client);
assertEquals("[foo] not found in stored responses", rsp.getResponse().get("status"));
}
use of org.apache.solr.client.solrj.response.CollectionAdminResponse in project ddf by codice.
the class BackupCommandTest method createDefaultCollection.
private static void createDefaultCollection() throws Exception {
CollectionAdminRequest.Create create = CollectionAdminRequest.createCollection(DEFAULT_CORE_NAME, DEFAULT_CONFIGSET, 1, 1);
CollectionAdminResponse response = create.process(miniSolrCloud.getSolrClient());
if (response.getStatus() != 0 || response.getErrorMessages() != null) {
fail("Could not create collection. Response: " + response.toString());
}
List<String> collections = CollectionAdminRequest.listCollections(miniSolrCloud.getSolrClient());
assertThat(collections.size(), is(1));
miniSolrCloud.getSolrClient().setDefaultCollection(DEFAULT_CORE_NAME);
}
Aggregations