tests: harden test

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1545013 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2013-11-24 17:30:00 +00:00
parent acee28acf4
commit 782b2e221c
1 changed files with 5 additions and 1 deletions

View File

@ -34,6 +34,7 @@ import org.apache.solr.client.solrj.SolrServer;
import org.apache.solr.client.solrj.SolrServerException;
import org.apache.solr.client.solrj.embedded.JettySolrRunner;
import org.apache.solr.client.solrj.impl.HttpSolrServer;
import org.apache.solr.client.solrj.impl.HttpSolrServer.RemoteSolrException;
import org.apache.solr.client.solrj.request.CoreAdminRequest.Create;
import org.apache.solr.client.solrj.request.QueryRequest;
import org.apache.solr.client.solrj.request.UpdateRequest;
@ -198,9 +199,12 @@ public class BasicDistributedZk2Test extends AbstractFullDistribZkTestBase {
// 2 docs added every call
private void addAndQueryDocs(final String baseUrl, int docs)
throws SolrServerException, IOException {
throws Exception {
HttpSolrServer qclient = new HttpSolrServer(baseUrl + "/onenodecollection" + "core");
// it might take a moment for the proxy node to see us in their cloud state
waitForNon403or404or503(qclient);
// add a doc
SolrInputDocument doc = new SolrInputDocument();
doc.addField("id", docs);