From 42f445b035d5ccc8deb6fdfeef3b6aada0247911 Mon Sep 17 00:00:00 2001 From: Mark Robert Miller Date: Thu, 20 Feb 2014 00:06:21 +0000 Subject: [PATCH] tests: remove this test git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1570001 13f79535-47bb-0310-9956-ffa450edef68 --- .../solrj/impl/BasicHttpSolrServerTest.java | 20 ------------------- 1 file changed, 20 deletions(-) diff --git a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/BasicHttpSolrServerTest.java b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/BasicHttpSolrServerTest.java index b053b81d5b9..5e801060919 100644 --- a/solr/solrj/src/test/org/apache/solr/client/solrj/impl/BasicHttpSolrServerTest.java +++ b/solr/solrj/src/test/org/apache/solr/client/solrj/impl/BasicHttpSolrServerTest.java @@ -141,26 +141,6 @@ public class BasicHttpSolrServerTest extends SolrJettyTestBase { .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 public void testTimeout() throws Exception { HttpSolrServer server = new HttpSolrServer(jetty.getBaseUrl().toString() +