mirror of https://github.com/apache/lucene.git
SOLR-10857: Solr loads UNLOADed core on request, cleaned up printStackTrace
This commit is contained in:
parent
b2ea95c9ec
commit
5a737a3aab
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue