Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

SOLR-18188: httpClient is left open causing flaky nightly o.a.s.cloud.ChaosMonkeyNothingIsSafeTest (#4709)

Eric Pugha3d9b52f35b2
diff --git a/solr/test-framework/src/java/org/apache/solr/cloud/FullThrottleStoppableIndexingThread.java b/solr/test-framework/src/java/org/apache/solr/cloud/FullThrottleStoppableIndexingThread.java
index 30c8f67d406..6396f109b67 100644
--- a/solr/test-framework/src/java/org/apache/solr/cloud/FullThrottleStoppableIndexingThread.java
+++ b/solr/test-framework/src/java/org/apache/solr/cloud/FullThrottleStoppableIndexingThread.java
@@ -31,6 +31,7 @@ import org.apache.solr.client.solrj.impl.HttpSolrClient;
import org.apache.solr.client.solrj.jetty.ConcurrentUpdateJettySolrClient;
import org.apache.solr.client.solrj.jetty.HttpJettySolrClient;
import org.apache.solr.common.SolrInputDocument;
+import org.apache.solr.common.util.IOUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -145,6 +146,7 @@ class FullThrottleStoppableIndexingThread extends StoppableIndexingThread {
log.warn("Exception waiting for the indexing client to finish", e);
} finally {
cusc.shutdownNow();
+ IOUtils.closeQuietly(httpClient);
}
}