Skip to content

Apache Lucene open-source search software

SOLR-12078: Fixed reproducable Failure in TestReplicationHandler.doTestIndexFetchOnMasterRestart that happened due to using stale http connections

Shalin Shekhar Mangarcb453ce110b1
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index f53b7db46ad..21eee6853fa 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -438,6 +438,9 @@ Other Changes
* SOLR-12067: Increase autoAddReplicas default 30 second wait time to 120 seconds.
(Varun Thacker, Mark Miller via shalin)
+* SOLR-12078: Fixed reproducable Failure in TestReplicationHandler.doTestIndexFetchOnMasterRestart that happened
+ due to using stale http connections. (Gus Heck, shalin)
+
================== 7.2.1 ==================
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
diff --git a/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java b/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java
index 842f35199b9..ddc5b604f85 100644
--- a/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java
+++ b/solr/core/src/test/org/apache/solr/handler/TestReplicationHandler.java
@@ -638,6 +638,10 @@ public class TestReplicationHandler extends SolrTestCaseJ4 {
masterJetty.stop();
masterJetty.start();
+ // close and re-create master client because its connection pool has stale connections
+ masterClient.close();
+ masterClient = createNewSolrClient(masterJetty.getLocalPort());
+
nDocs--;
for (int i = 0; i < nDocs; i++)
index(masterClient, "id", i, "name", "name = " + i);