Apache Lucene open-source search software
SOLR-7032: Clean up tests remnanat of old-style solr.xml
Erick Erickson6d68694ce549
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txtindex a8b4cb01a36..f5bc6e22231 100644--- a/solr/CHANGES.txt+++ b/solr/CHANGES.txt@@ -174,6 +174,8 @@ Other Changestests to allow for multiple tests without the same class.(Ramkumar Aiyengar, Erick Erickson, Mike McCandless)+* SOLR-7032: Clean up test remnants of old-style solr.xml (Erick Erickson)+================== 5.0.0 ==================Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.diff --git a/solr/contrib/map-reduce/src/java/org/apache/solr/hadoop/SolrOutputFormat.java b/solr/contrib/map-reduce/src/java/org/apache/solr/hadoop/SolrOutputFormat.javaindex bd4c1b0e9c6..a8a870af643 100644--- a/solr/contrib/map-reduce/src/java/org/apache/solr/hadoop/SolrOutputFormat.java+++ b/solr/contrib/map-reduce/src/java/org/apache/solr/hadoop/SolrOutputFormat.java@@ -244,7 +244,6 @@ public class SolrOutputFormat<K, V> extends FileOutputFormat<K, V> {ZipEntry ze = new ZipEntry("solr.xml");zos.putNextEntry(ze);- zos.write("<cores><core name=\"collection1\" instanceDir=\".\"/></cores>".getBytes(StandardCharsets.UTF_8));zos.flush();zos.closeEntry();zos.close();diff --git a/solr/contrib/map-reduce/src/java/org/apache/solr/hadoop/ZooKeeperInspector.java b/solr/contrib/map-reduce/src/java/org/apache/solr/hadoop/ZooKeeperInspector.javaindex c434f4eb9a8..f559a3acf78 100644--- a/solr/contrib/map-reduce/src/java/org/apache/solr/hadoop/ZooKeeperInspector.java+++ b/solr/contrib/map-reduce/src/java/org/apache/solr/hadoop/ZooKeeperInspector.java@@ -193,7 +193,7 @@ final class ZooKeeperInspector {Files.move(dir, confDir);dir = confDir.getParentFile();}- FileUtils.writeStringToFile(new File(dir, "solr.xml"), "<solr><cores><core name=\"collection1\" instanceDir=\".\" /></cores></solr>", "UTF-8");+ FileUtils.writeStringToFile(new File(dir, "solr.xml"), "<solr></solr>", "UTF-8");verifyConfigDir(confDir);return dir;}diff --git a/solr/contrib/morphlines-core/src/test-files/solr/minimr/solr.xml b/solr/contrib/morphlines-core/src/test-files/solr/minimr/solr.xmlindex 56f7ce78a39..8ed4587145a 100644--- a/solr/contrib/morphlines-core/src/test-files/solr/minimr/solr.xml+++ b/solr/contrib/morphlines-core/src/test-files/solr/minimr/solr.xml@@ -24,21 +24,23 @@--><solr persistent="${solr.xml.persist:false}">- <!--- adminPath: RequestHandler path to manage cores.- If 'null' (or absent), cores will not be manageable via request handler- -->- <cores adminPath="/admin/cores" defaultCoreName="collection1" host="127.0.0.1" hostPort="${hostPort:8983}"- hostContext="${hostContext:solr}" zkClientTimeout="${solr.zkclienttimeout:30000}" numShards="${numShards:3}" shareSchema="${shareSchema:false}"- genericCoreNodeNames="${genericCoreNodeNames:true}" leaderVoteWait="0"- distribUpdateConnTimeout="${distribUpdateConnTimeout:15000}" distribUpdateSoTimeout="${distribUpdateSoTimeout:120000}">- <core name="collection1" instanceDir="." shard="${shard:}" collection="${collection:collection1}" config="${solrconfig:solrconfig.xml}" schema="${schema:schema.xml}"- coreNodeName="${coreNodeName:}"/>- <shardHandlerFactory name="shardHandlerFactory" class="HttpShardHandlerFactory">+ <str name="shareSchema">${shareSchema:false}</str>++ <solrcloud>+ <str name="host">127.0.0.1</str>+ <int name="hostPort">${hostPort:8983}</int>+ <str name="hostContext">${hostContext:solr}</str>+ <bool name="genericCoreNodeNames">${genericCoreNodeNames:true}</bool>+ <int name="leaderVoteWait">0</int>+ <int name="distribUpdateSoTimeout">${distribUpdateSoTimeout:120000}</int>+ <int name="distribUpdateConnTimeout">${distribUpdateConnTimeout:15000}</int>+ <int name="zkClientTimeout">${solr.zkclienttimeout:30000}</int>+++ <shardHandlerFactory name="shardHandlerFactory" class="HttpShardHandlerFactory"><str name="urlScheme">${urlScheme:}</str><int name="socketTimeout">${socketTimeout:120000}</int><int name="connTimeout">${connTimeout:15000}</int></shardHandlerFactory>- </cores>-+</solr>diff --git a/solr/contrib/morphlines-core/src/test-files/solr/mrunit/solr.xml b/solr/contrib/morphlines-core/src/test-files/solr/mrunit/solr.xmlindex 56f7ce78a39..8c1509aabc4 100644--- a/solr/contrib/morphlines-core/src/test-files/solr/mrunit/solr.xml+++ b/solr/contrib/morphlines-core/src/test-files/solr/mrunit/solr.xml@@ -22,23 +22,24 @@persistent: Save changes made via the API to this filesharedLib: path to a lib directory that will be shared across all cores-->-<solr persistent="${solr.xml.persist:false}">+<solr>++ <str name="shareSchema">${shareSchema:false}</str>++ <solrcloud>+ <int name="hostPort">${hostPort:8983}</int>+ <int name="hostPort">${hostPort:8983}</int>+ <int name="zkClientTimeout">${solr.zkclienttimeout:30000}</int>+ <bool name="genericCoreNodeNames">${genericCoreNodeNames:true}</bool>+ <int name="leaderVoteWait">0</int>+ <int name="distribUpdateConnTimeout">${distribUpdateConnTimeout:15000}</int>+ <int name="distribUpdateSoTimeout">${distribUpdateSoTimeout:120000}</int>+ </solrcloud>++ <shardHandlerFactory name="shardHandlerFactory" class="HttpShardHandlerFactory">+ <str name="urlScheme">${urlScheme:}</str>+ <int name="socketTimeout">${socketTimeout:120000}</int>+ <int name="connTimeout">${connTimeout:15000}</int>+ </shardHandlerFactory>- <!--- adminPath: RequestHandler path to manage cores.- If 'null' (or absent), cores will not be manageable via request handler- -->- <cores adminPath="/admin/cores" defaultCoreName="collection1" host="127.0.0.1" hostPort="${hostPort:8983}"- hostContext="${hostContext:solr}" zkClientTimeout="${solr.zkclienttimeout:30000}" numShards="${numShards:3}" shareSchema="${shareSchema:false}"- genericCoreNodeNames="${genericCoreNodeNames:true}" leaderVoteWait="0"- distribUpdateConnTimeout="${distribUpdateConnTimeout:15000}" distribUpdateSoTimeout="${distribUpdateSoTimeout:120000}">- <core name="collection1" instanceDir="." shard="${shard:}" collection="${collection:collection1}" config="${solrconfig:solrconfig.xml}" schema="${schema:schema.xml}"- coreNodeName="${coreNodeName:}"/>- <shardHandlerFactory name="shardHandlerFactory" class="HttpShardHandlerFactory">- <str name="urlScheme">${urlScheme:}</str>- <int name="socketTimeout">${socketTimeout:120000}</int>- <int name="connTimeout">${connTimeout:15000}</int>- </shardHandlerFactory>- </cores>-</solr>diff --git a/solr/contrib/morphlines-core/src/test-files/solr/solr.xml b/solr/contrib/morphlines-core/src/test-files/solr/solr.xmlindex 5c8756ec476..e67eb1d4054 100644--- a/solr/contrib/morphlines-core/src/test-files/solr/solr.xml+++ b/solr/contrib/morphlines-core/src/test-files/solr/solr.xml@@ -31,22 +31,4 @@<int name="connTimeout">${connTimeout:15000}</int></shardHandlerFactory>- <!--- adminPath: RequestHandler path to manage cores.- If 'null' (or absent), cores will not be manageable via request handler-- <cores adminPath="/admin/cores" defaultCoreName="collection1" host="127.0.0.1" hostPort="${hostPort:8983}"- hostContext="${hostContext:solr}" zkClientTimeout="${solr.zkclienttimeout:30000}" numShards="${numShards:3}" shareSchema="${shareSchema:false}"- genericCoreNodeNames="${genericCoreNodeNames:true}" leaderVoteWait="0"- distribUpdateConnTimeout="${distribUpdateConnTimeout:15000}" distribUpdateSoTimeout="${distribUpdateSoTimeout:120000}">- <core name="collection1" instanceDir="collection1" shard="${shard:}" collection="${collection:collection1}" config="${solrconfig:solrconfig.xml}" schema="${schema:schema.xml}"- coreNodeName="${coreNodeName:}"/>- <shardHandlerFactory name="shardHandlerFactory" class="HttpShardHandlerFactory">- <str name="urlScheme">${urlScheme:}</str>- <int name="socketTimeout">${socketTimeout:120000}</int>- <int name="connTimeout">${connTimeout:15000}</int>- </shardHandlerFactory>- </cores>- -->-</solr>diff --git a/solr/core/src/test-files/old-solr-example/README.txt b/solr/core/src/test-files/old-solr-example/README.txtindex 6242cff237b..e69de29bb2d 100644--- a/solr/core/src/test-files/old-solr-example/README.txt+++ b/solr/core/src/test-files/old-solr-example/README.txt@@ -1 +0,0 @@-This is around for back compat testing purposes and should be able to be removed in Solr 5.0\ No newline at end of filediff --git a/solr/core/src/test-files/old-solr-example/solr.xml b/solr/core/src/test-files/old-solr-example/solr.xmlindex 75da88a52f1..e69de29bb2d 100644--- a/solr/core/src/test-files/old-solr-example/solr.xml+++ b/solr/core/src/test-files/old-solr-example/solr.xml@@ -1,53 +0,0 @@-<?xml version="1.0" encoding="UTF-8" ?>-<!--- Licensed to the Apache Software Foundation (ASF) under one or more- contributor license agreements. See the NOTICE file distributed with- this work for additional information regarding copyright ownership.- The ASF licenses this file to You under the Apache License, Version 2.0- (the "License"); you may not use this file except in compliance with- the License. You may obtain a copy of the License at-- http://www.apache.org/licenses/LICENSE-2.0-- Unless required by applicable law or agreed to in writing, software- distributed under the License is distributed on an "AS IS" BASIS,- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.- See the License for the specific language governing permissions and- limitations under the License.--->--<!--- This is an example of a simple "solr.xml" file for configuring one or- more Solr Cores, as well as allowing Cores to be added, removed, and- reloaded via HTTP requests.-- More information about options available in this configuration file,- and Solr Core administration can be found online:- http://wiki.apache.org/solr/CoreAdmin--->--<!--- All (relative) paths are relative to the Solr Home Directory-- persistent: Save changes made via the API to this file- sharedLib: path to a lib directory that will be shared across all cores--->-<solr persistent="true">- <!-- by default, this is 50 @ WARN- <logging enabled="true">- <watcher size="100" threshold="INFO" />- </logging>- -->-- <!--- adminPath: RequestHandler path to manage cores.- If 'null' (or absent), cores will not be manageable via request handler- defaultCoreName: (optional) core to use when no core name is specified in an access url-- All of the attributes in cores after defaultCoreName only apply when running in SolrCloud mode.- You can read more about SolrCloud mode at http://wiki.apache.org/solr/SolrCloud- -->- <cores adminPath="/admin/cores" defaultCoreName="collection1" host="${host:}" hostPort="${jetty.port:8983}" hostContext="${hostContext:solr}" zkClientTimeout="${zkClientTimeout:15000}">- <core name="collection1" instanceDir="collection1" />- </cores>-</solr>diff --git a/solr/core/src/test-files/solr/solr-multicore.xml b/solr/core/src/test-files/solr/solr-multicore.xmlindex d4ba9ebe9b0..e69de29bb2d 100644--- a/solr/core/src/test-files/solr/solr-multicore.xml+++ b/solr/core/src/test-files/solr/solr-multicore.xml@@ -1,73 +0,0 @@-<?xml version="1.0" encoding="UTF-8" ?>-<!--- Licensed to the Apache Software Foundation (ASF) under one or more- contributor license agreements. See the NOTICE file distributed with- this work for additional information regarding copyright ownership.- The ASF licenses this file to You under the Apache License, Version 2.0- (the "License"); you may not use this file except in compliance with- the License. You may obtain a copy of the License at-- http://www.apache.org/licenses/LICENSE-2.0-- Unless required by applicable law or agreed to in writing, software- distributed under the License is distributed on an "AS IS" BASIS,- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.- See the License for the specific language governing permissions and- limitations under the License.--->--<!--- All (relative) paths are relative to the installation path-- persistent: Save changes made via the API to this file- sharedLib: path to a lib directory that will be shared across all cores--->-<solr persistent="false">-- <!--- adminPath: RequestHandler path to manage cores.- If 'null' (or absent), cores will not be manageable via request handler- -->- <cores adminPath="/admin/cores" host="${host:}" hostPort="${jetty.port:}">- <core name="core0" instanceDir="core0" />- <core name="core1" instanceDir="core1" />- </cores>-</solr>-<?xml version="1.0" encoding="UTF-8" ?>-<!--- Licensed to the Apache Software Foundation (ASF) under one or more- contributor license agreements. See the NOTICE file distributed with- this work for additional information regarding copyright ownership.- The ASF licenses this file to You under the Apache License, Version 2.0- (the "License"); you may not use this file except in compliance with- the License. You may obtain a copy of the License at-- http://www.apache.org/licenses/LICENSE-2.0-- Unless required by applicable law or agreed to in writing, software- distributed under the License is distributed on an "AS IS" BASIS,- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.- See the License for the specific language governing permissions and- limitations under the License.--->--<!--- All (relative) paths are relative to the installation path-- persistent: Save changes made via the API to this file- sharedLib: path to a lib directory that will be shared across all cores--->-<solr persistent="false">-- <!--- adminPath: RequestHandler path to manage cores.- If 'null' (or absent), cores will not be manageable via request handler- -->- <cores adminPath="/admin/cores" host="${host:}" hostPort="${jetty.port:}">- <core name="core0" instanceDir="core0" />- <core name="core1" instanceDir="core1" />- </cores>- <shardHandlerFactory name="shardHandlerFactory" class="HttpShardHandlerFactory">- <str name="urlScheme">${urlScheme:}</str>- </shardHandlerFactory>-</solr>diff --git a/solr/core/src/test/org/apache/solr/SolrTestCaseJ4Test.java b/solr/core/src/test/org/apache/solr/SolrTestCaseJ4Test.javaindex 74aeee96a66..75f669388d4 100644--- a/solr/core/src/test/org/apache/solr/SolrTestCaseJ4Test.java+++ b/solr/core/src/test/org/apache/solr/SolrTestCaseJ4Test.java@@ -43,8 +43,12 @@ public class SolrTestCaseJ4Test extends SolrTestCaseJ4 {FileUtils.copyFile(new File(top, "solrconfig.snippet.randomindexconfig.xml"), new File(subHome, "solrconfig.snippet.randomindexconfig.xml"));FileUtils.copyDirectory(new File(tmpSolrHome, "core0"), new File(tmpSolrHome, "core1"));+ // Core discovery will default to the name of the dir the core.properties file is in. So if everything else is+ // OK as defaults, just the _presence_ of this file is sufficient.+ FileUtils.touch(new File(tmpSolrHome, "core0/core.properties"));+ FileUtils.touch(new File(tmpSolrHome, "core1/core.properties"));- FileUtils.copyFile(getFile("solr/solr-multicore.xml"), new File(tmpSolrHome, "solr.xml"));+ FileUtils.copyFile(getFile("solr/solr.xml"), new File(tmpSolrHome, "solr.xml"));initCore("solrconfig-minimal.xml", "schema-tiny.xml", tmpSolrHome, "core1");}diff --git a/solr/solrj/src/test-files/solrj/solr/shared/solr.xml b/solr/solrj/src/test-files/solrj/solr/shared/solr.xmlindex 7abf439359f..75e95f79b0b 100644--- a/solr/solrj/src/test-files/solrj/solr/shared/solr.xml+++ b/solr/solrj/src/test-files/solrj/solr/shared/solr.xml@@ -40,35 +40,3 @@</solrcloud></solr>--<!--- All (relative) paths are relative to the installation path-- persistent: Save changes made via the API to this file- sharedLib: path to a lib directory that will be shared across all cores--<solr persistent="false">- <property name="version" value="1.3"/>- <property name="lang" value="english, french"/>--- adminPath: RequestHandler path to manage cores.- If 'null' (or absent), cores will not be manageable via REST-- <cores adminPath="/admin/cores" defaultCoreName="core0" host="127.0.0.1" hostPort="${hostPort:8983}" hostContext="${hostContext:solr}" zkClientTimeout="8000" genericCoreNodeNames="${genericCoreNodeNames:true}" configSetBaseDir="${configSetBase:configsets}">- <core name="collection1" instanceDir="." />- <core name="core0" instanceDir="${theInstanceDir:./}" dataDir="${dataDir1}" collection="${collection:acollection}">- <property name="version" value="3.5"/>- <property name="l10n" value="EN"/>- <property name="ctlField" value="core0"/>- <property name="comment" value="This is a sample with a sys prop ${sysprop:default}"/>- </core>- <core name="core1" instanceDir="./" dataDir="${dataDir2}">- <property name="version" value="2.4"/>- <property name="l10n" value="FR"/>- <property name="ctlField" value="core1"/>- <property name="comment" value="Ceci est un exemple"/>- </core>- </cores>-</solr>--->diff --git a/solr/solrj/src/test-files/solrj/solr/solr.xml b/solr/solrj/src/test-files/solrj/solr/solr.xmlindex 8f799668f5d..6eef53fbf05 100644--- a/solr/solrj/src/test-files/solrj/solr/solr.xml+++ b/solr/solrj/src/test-files/solrj/solr/solr.xml@@ -44,29 +44,3 @@</solrcloud></solr>--- <!--- All (relative) paths are relative to the installation path-- persistent: Save changes made via the API to this file- sharedLib: path to a lib directory that will be shared across all cores--<solr persistent="false">---- <cores adminPath="/admin/cores" defaultCoreName="collection1" host="127.0.0.1" hostPort="${hostPort:8983}"- hostContext="${hostContext:solr}" zkClientTimeout="${solr.zkclienttimeout:30000}" shareSchema="${shareSchema:false}"- genericCoreNodeNames="${genericCoreNodeNames:true}" leaderVoteWait="0"- distribUpdateConnTimeout="${distribUpdateConnTimeout:45000}" distribUpdateSoTimeout="${distribUpdateSoTimeout:340000}">- <core name="collection1" instanceDir="collection1" shard="${shard:}" collection="${collection:collection1}" />-- <shardHandlerFactory name="shardHandlerFactory" class="HttpShardHandlerFactory">- <str name="urlScheme">${urlScheme:}</str>- <int name="socketTimeout">${socketTimeout:90000}</int>- <int name="connTimeout">${connTimeout:15000}</int>- </shardHandlerFactory>- </cores>-</solr>--->\ No newline at end of file