tests: remove this test

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1570001 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Mark Robert Miller 2014-02-20 00:06:21 +00:00
parent cf725744e0
commit 42f445b035
1 changed files with 0 additions and 20 deletions

View File

@ -141,26 +141,6 @@ public class BasicHttpSolrServerTest extends SolrJettyTestBase {
.addServletWithMapping(DebugServlet.class, "/debug/*"); .addServletWithMapping(DebugServlet.class, "/debug/*");
} }
// what is this actually testing? this test WILL randomly fail.
// not a good unit test!
@Test
public void testConnectionRefused() throws MalformedURLException {
int unusedPort = findUnusedPort(); // XXX even if fwe found an unused port
// it might not be unused anymore
HttpSolrServer server = new HttpSolrServer(buildUrl(unusedPort, "/solr"));
server.setConnectionTimeout(500);
SolrQuery q = new SolrQuery("*:*");
try {
QueryResponse response = server.query(q);
fail("Should have thrown an exception.");
} catch (SolrServerException e) {
assumeFalse("blackholed!", e.getMessage().contains("IOException occured when talking to server"));
assertTrue(e.getMessage().contains("refused"));
} finally {
server.shutdown();
}
}
@Test @Test
public void testTimeout() throws Exception { public void testTimeout() throws Exception {
HttpSolrServer server = new HttpSolrServer(jetty.getBaseUrl().toString() + HttpSolrServer server = new HttpSolrServer(jetty.getBaseUrl().toString() +