From 3c9050c3dd3f4ceda3dad612307e0589cf2e12ab Mon Sep 17 00:00:00 2001 From: Shalin Shekhar Mangar Date: Mon, 20 Aug 2018 14:24:31 +0530 Subject: [PATCH] SOLR-12679: MiniSolrCloudCluster.startJettySolrRunner method should not add a duplicate jetty instance to the list --- solr/CHANGES.txt | 2 +- .../src/java/org/apache/solr/cloud/MiniSolrCloudCluster.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt index c80958bb45f..963f1bab629 100644 --- a/solr/CHANGES.txt +++ b/solr/CHANGES.txt @@ -247,7 +247,7 @@ Bug Fixes * SOLR-12674: RollupStream should not use the HashQueryParser for 1 worker. (Varun Thacker) -* SOLR-12679: MiniSolrCloudCluster.stopJettySolrRunner should remove jetty from the internal list. (shalin) +* SOLR-12679: MiniSolrCloudCluster internal jetty list should never have duplicates (shalin) Optimizations ---------------------- diff --git a/solr/test-framework/src/java/org/apache/solr/cloud/MiniSolrCloudCluster.java b/solr/test-framework/src/java/org/apache/solr/cloud/MiniSolrCloudCluster.java index 8b442db3083..f49870fdca0 100644 --- a/solr/test-framework/src/java/org/apache/solr/cloud/MiniSolrCloudCluster.java +++ b/solr/test-framework/src/java/org/apache/solr/cloud/MiniSolrCloudCluster.java @@ -423,7 +423,7 @@ public class MiniSolrCloudCluster { */ public JettySolrRunner startJettySolrRunner(JettySolrRunner jetty) throws Exception { jetty.start(false); - jettys.add(jetty); + if (!jettys.contains(jetty)) jettys.add(jetty); return jetty; }