SOLR-10857: Solr loads UNLOADed core on request, cleaned up printStackTrace

This commit is contained in:
Erick Erickson 2017-06-12 09:40:34 -07:00
parent b2ea95c9ec
commit 5a737a3aab
1 changed files with 10 additions and 12 deletions

View File

@ -320,18 +320,16 @@ public class CoreAdminHandlerTest extends SolrTestCaseJ4 {
req.process(client); req.process(client);
} }
try (HttpSolrClient client = getHttpSolrClient(runner.getBaseUrl() + "/corex")) { HttpSolrClient.RemoteSolrException rse = expectThrows(HttpSolrClient.RemoteSolrException.class, () -> {
client.setConnectionTimeout(SolrTestCaseJ4.DEFAULT_CONNECTION_TIMEOUT); try (HttpSolrClient client = getHttpSolrClient(runner.getBaseUrl() + "/corex")) {
client.setSoTimeout(SolrTestCaseJ4.DEFAULT_CONNECTION_TIMEOUT*1000); client.setConnectionTimeout(SolrTestCaseJ4.DEFAULT_CONNECTION_TIMEOUT);
QueryResponse result = client.query(new SolrQuery("id:*")); client.setSoTimeout(SolrTestCaseJ4.DEFAULT_CONNECTION_TIMEOUT * 1000);
//assertEquals(1,result.getResults().getNumFound()); client.query(new SolrQuery("id:*"));
fail("expect 404"); } finally {
}catch(Exception e){ runner.stop();
e.printStackTrace(); }
} });
finally{ assertTrue(rse.getMessage().contains("Can not find: /solr/corex/select"));
runner.stop();
}
} }
@Test @Test