From 782b2e221c8db208e30420b3d21bb31e2a8f38f7 Mon Sep 17 00:00:00 2001 From: Mark Robert Miller Date: Sun, 24 Nov 2013 17:30:00 +0000 Subject: [PATCH] tests: harden test git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1545013 13f79535-47bb-0310-9956-ffa450edef68 --- .../test/org/apache/solr/cloud/BasicDistributedZk2Test.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZk2Test.java b/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZk2Test.java index 1dbf465b3d6..7a9bb992faa 100644 --- a/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZk2Test.java +++ b/solr/core/src/test/org/apache/solr/cloud/BasicDistributedZk2Test.java @@ -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);