You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by er...@apache.org on 2017/06/12 16:54:10 UTC
lucene-solr:branch_6_6: SOLR-10857: Solr loads UNLOADed core on
request, cleaned up printStackTrace
Repository: lucene-solr
Updated Branches:
refs/heads/branch_6_6 bc4704244 -> 59af12954
SOLR-10857: Solr loads UNLOADed core on request, cleaned up printStackTrace
(cherry picked from commit 5a737a3aab969b120a84dbc7cd7ed351796576b3)
(cherry picked from commit 40368ec6b01d2f1198cbe57f7374233d74631249)
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/59af1295
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/59af1295
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/59af1295
Branch: refs/heads/branch_6_6
Commit: 59af129548d50c07b3b9b9f879a7105b5dfcd3d8
Parents: bc47042
Author: Erick Erickson <er...@apache.org>
Authored: Mon Jun 12 09:49:51 2017 -0700
Committer: Erick Erickson <er...@apache.org>
Committed: Mon Jun 12 09:49:51 2017 -0700
----------------------------------------------------------------------
.../handler/admin/CoreAdminHandlerTest.java | 22 +++++++++-----------
1 file changed, 10 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/59af1295/solr/core/src/test/org/apache/solr/handler/admin/CoreAdminHandlerTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/handler/admin/CoreAdminHandlerTest.java b/solr/core/src/test/org/apache/solr/handler/admin/CoreAdminHandlerTest.java
index f1770f8..06c30e6 100644
--- a/solr/core/src/test/org/apache/solr/handler/admin/CoreAdminHandlerTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/admin/CoreAdminHandlerTest.java
@@ -320,18 +320,16 @@ public class CoreAdminHandlerTest extends SolrTestCaseJ4 {
req.process(client);
}
- try (HttpSolrClient client = getHttpSolrClient(runner.getBaseUrl() + "/corex")) {
- client.setConnectionTimeout(SolrTestCaseJ4.DEFAULT_CONNECTION_TIMEOUT);
- client.setSoTimeout(SolrTestCaseJ4.DEFAULT_CONNECTION_TIMEOUT*1000);
- QueryResponse result = client.query(new SolrQuery("id:*"));
- //assertEquals(1,result.getResults().getNumFound());
- fail("expect 404");
- }catch(Exception e){
- e.printStackTrace();
- }
- finally{
- runner.stop();
- }
+ HttpSolrClient.RemoteSolrException rse = expectThrows(HttpSolrClient.RemoteSolrException.class, () -> {
+ try (HttpSolrClient client = getHttpSolrClient(runner.getBaseUrl() + "/corex")) {
+ client.setConnectionTimeout(SolrTestCaseJ4.DEFAULT_CONNECTION_TIMEOUT);
+ client.setSoTimeout(SolrTestCaseJ4.DEFAULT_CONNECTION_TIMEOUT * 1000);
+ client.query(new SolrQuery("id:*"));
+ } finally {
+ runner.stop();
+ }
+ });
+ assertTrue(rse.getMessage().contains("Can not find: /solr/corex/select"));
}
@Test