SOLR-7604: add testcase to verify the schema of .system collection

This commit is contained in:
Noble Paul 2016-10-26 02:04:20 +05:30
parent c9de11d024
commit 34ad8577b6
1 changed files with 10 additions and 0 deletions

View File

@ -28,6 +28,8 @@ 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;
import org.apache.solr.client.solrj.request.GenericSolrRequest;
import org.apache.solr.client.solrj.request.schema.SchemaRequest;
import org.apache.solr.client.solrj.response.CollectionAdminResponse; import org.apache.solr.client.solrj.response.CollectionAdminResponse;
import org.apache.solr.cloud.AbstractFullDistribZkTestBase; import org.apache.solr.cloud.AbstractFullDistribZkTestBase;
import org.apache.solr.common.cloud.DocCollection; import org.apache.solr.common.cloud.DocCollection;
@ -81,6 +83,14 @@ public class TestBlobHandler extends AbstractFullDistribZkTestBase {
"requestHandler", "requestHandler",
"/blob", "/blob",
"class"))); "class")));
map = TestSolrConfigHandlerConcurrent.getAsMap(baseUrl + "/.system/schema/fields/blob", cloudClient);
assertNotNull(map);
assertEquals("blob", getObjectByPath(map, true, Arrays.asList(
"field",
"name")));
assertEquals("bytes", getObjectByPath(map, true, Arrays.asList(
"field",
"type")));
byte[] bytarr = new byte[1024]; byte[] bytarr = new byte[1024];
for (int i = 0; i < bytarr.length; i++) bytarr[i] = (byte) (i % 127); for (int i = 0; i < bytarr.length; i++) bytarr[i] = (byte) (i % 127);