You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2013/02/28 22:47:40 UTC
svn commit: r1451370 -
/lucene/dev/trunk/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java
Author: markrmiller
Date: Thu Feb 28 21:47:39 2013
New Revision: 1451370
URL: http://svn.apache.org/r1451370
Log:
tests: add test that hits update url
Modified:
lucene/dev/trunk/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java
Modified: lucene/dev/trunk/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java?rev=1451370&r1=1451369&r2=1451370&view=diff
==============================================================================
--- lucene/dev/trunk/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java (original)
+++ lucene/dev/trunk/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZkTest.java Thu Feb 28 21:47:39 2013
@@ -322,6 +322,7 @@ public class BasicDistributedZkTest exte
testMultipleCollections();
testANewCollectionInOneInstance();
testSearchByCollectionName();
+ testUpdateByCollectionName();
testANewCollectionInOneInstanceWithManualShardAssignement();
testNumberOfCommitsWithCommitAfterAdd();
@@ -681,6 +682,21 @@ public class BasicDistributedZkTest exte
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");