You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ho...@apache.org on 2018/02/28 22:45:22 UTC
lucene-solr:branch_7x: fix leaked SolrClient in SSLMigrationTest
Repository: lucene-solr
Updated Branches:
refs/heads/branch_7x 1ab2f5adb -> 741461a67
fix leaked SolrClient in SSLMigrationTest
this doesn't garuntee that this test will pass, but it eliminates the garuntee that it will fail
(cherry picked from commit 60984536b068d80fbb76190544c73fd245233154)
Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/741461a6
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/741461a6
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/741461a6
Branch: refs/heads/branch_7x
Commit: 741461a67400de24dc7e4edb3d825fe8f52203fb
Parents: 1ab2f5a
Author: Chris Hostetter <ho...@apache.org>
Authored: Wed Feb 28 15:26:39 2018 -0700
Committer: Chris Hostetter <ho...@apache.org>
Committed: Wed Feb 28 15:26:59 2018 -0700
----------------------------------------------------------------------
solr/core/src/test/org/apache/solr/cloud/SSLMigrationTest.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/741461a6/solr/core/src/test/org/apache/solr/cloud/SSLMigrationTest.java
----------------------------------------------------------------------
diff --git a/solr/core/src/test/org/apache/solr/cloud/SSLMigrationTest.java b/solr/core/src/test/org/apache/solr/cloud/SSLMigrationTest.java
index 8d4d024..df51b6e 100644
--- a/solr/core/src/test/org/apache/solr/cloud/SSLMigrationTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/SSLMigrationTest.java
@@ -16,10 +16,12 @@
*/
package org.apache.solr.cloud;
+
import org.apache.commons.lang.StringUtils;
import org.apache.lucene.util.LuceneTestCase.BadApple;
import org.apache.lucene.util.LuceneTestCase.Slow;
import org.apache.solr.SolrTestCaseJ4.SuppressSSL;
+import org.apache.solr.client.solrj.SolrClient;
import org.apache.solr.client.solrj.SolrRequest;
import org.apache.solr.client.solrj.embedded.JettyConfig;
import org.apache.solr.client.solrj.embedded.JettySolrRunner;
@@ -129,7 +131,9 @@ public class SSLMigrationTest extends AbstractFullDistribZkTestBase {
urls.add(replica.getStr(ZkStateReader.BASE_URL_PROP));
}
//Create new SolrServer to configure new HttpClient w/ SSL config
- getLBHttpSolrClient(urls.toArray(new String[]{})).request(request);
+ try (SolrClient client = getLBHttpSolrClient(urls.toArray(new String[]{}))) {
+ client.request(request);
+ }
}
}