mirror of https://github.com/apache/lucene.git
tests: add test that hits update url
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1451370 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f5e2e50c7f
commit
7f9f3c5105
|
@ -322,6 +322,7 @@ public class BasicDistributedZkTest extends AbstractFullDistribZkTestBase {
|
|||
testMultipleCollections();
|
||||
testANewCollectionInOneInstance();
|
||||
testSearchByCollectionName();
|
||||
testUpdateByCollectionName();
|
||||
testANewCollectionInOneInstanceWithManualShardAssignement();
|
||||
testNumberOfCommitsWithCommitAfterAdd();
|
||||
|
||||
|
@ -681,6 +682,21 @@ public class BasicDistributedZkTest extends AbstractFullDistribZkTestBase {
|
|||
long oneDocs = client1.query(query).getResults().getNumFound();
|
||||
assertEquals(3, oneDocs);
|
||||
}
|
||||
|
||||
private void testUpdateByCollectionName() throws SolrServerException, IOException {
|
||||
log.info("### STARTING testUpdateByCollectionName");
|
||||
SolrServer client = clients.get(0);
|
||||
final String baseUrl = ((HttpSolrServer) client).getBaseURL().substring(
|
||||
0,
|
||||
((HttpSolrServer) client).getBaseURL().length()
|
||||
- DEFAULT_COLLECTION.length() - 1);
|
||||
|
||||
// the cores each have different names, but if we add the collection name to the url
|
||||
// we should get mapped to the right core
|
||||
// test hitting an update url
|
||||
SolrServer client1 = createNewSolrServer(oneInstanceCollection, baseUrl);
|
||||
client1.commit();
|
||||
}
|
||||
|
||||
private void testANewCollectionInOneInstance() throws Exception {
|
||||
log.info("### STARTING testANewCollectionInOneInstance");
|
||||
|
|
Loading…
Reference in New Issue