Apache Lucene open-source search software
Fix test to use solr.disable.shardsWhitelist=true rather then trying to whitelist the set of servers
Chris Hostetter3fe4d0a30aab
diff --git a/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacets.java b/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacets.javaindex 460a9360de5..b70c8ddd7b2 100644--- a/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacets.java+++ b/solr/core/src/test/org/apache/solr/search/facet/TestJsonFacets.java@@ -58,6 +58,7 @@ public class TestJsonFacets extends SolrTestCaseHS {@BeforeClasspublic static void beforeTests() throws Exception {+ systemSetPropertySolrDisableShardsWhitelist("true");JSONTestUtil.failRepeatedKeys = true;origTableSize = FacetFieldProcessorByHashDV.MAXIMUM_STARTING_TABLE_SIZE;@@ -74,35 +75,16 @@ public class TestJsonFacets extends SolrTestCaseHS {}/**- * Start all servers for cluster, initialize shards whitelist and then restart+ * Start all servers for cluster if they don't already exist*/public static void initServers() throws Exception {if (servers == null) {servers = new SolrInstances(3, "solrconfig-tlog.xml", "schema_latest.xml");- // Set the shards whitelist to all shards plus the fake one used for tolerant test- System.setProperty(SOLR_TESTS_SHARDS_WHITELIST, servers.getWhitelistString() + ",http://[ff01::114]:33332");- systemSetPropertySolrDisableShardsWhitelist("false");- restartServers();}}- /**- * Restart all configured servers, i.e. configuration will be re-read- */- public static void restartServers() {- servers.slist.forEach(s -> {- try {- s.stop();- s.start();- } catch (Exception e) {- fail("Exception during server restart: " + e.getMessage());- }- });- }-@AfterClasspublic static void afterTests() throws Exception {- System.clearProperty(SOLR_TESTS_SHARDS_WHITELIST);systemClearPropertySolrDisableShardsWhitelist();JSONTestUtil.failRepeatedKeys = false;FacetFieldProcessorByHashDV.MAXIMUM_STARTING_TABLE_SIZE=origTableSize;