try to catch what's causing failures in TestLBHttpSolrServer - fail immediately if we can't grab the requested port

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@826277 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2009-10-17 16:20:41 +00:00
parent ab73e27c75
commit 4a55c86b5c
1 changed files with 5 additions and 1 deletions

View File

@ -224,7 +224,11 @@ public class TestLBHttpSolrServer extends TestCase {
System.setProperty("solr.solr.home", getHomeDir());
System.setProperty("solr.data.dir", getDataDir());
jetty.start();
this.port = jetty.getLocalPort();
int newPort = jetty.getLocalPort();
if (port != 0 && newPort != port) {
TestCase.fail("TESTING FAILURE: could not grab requested port.");
}
this.port = newPort;
// System.out.println("waiting.........");
// Thread.sleep(5000);
}