mirror of https://github.com/apache/lucene.git
SOLR-9277: Clean up some more remnants of supporting old and new style solr.xml in tests
This commit is contained in:
parent
2bd6c4ecd7
commit
7743718d29
|
@ -154,6 +154,8 @@ Other Changes
|
|||
|
||||
* SOLR-7930: Comment out trappy references to example docs in elevate.xml files (Erick Erickson)
|
||||
|
||||
* SOLR-9277: Clean up some more remnants of supporting old and new style solr.xml in tests (Erick Erickson)
|
||||
|
||||
================== 6.1.0 ==================
|
||||
|
||||
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
|
||||
|
|
|
@ -1,45 +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.
|
||||
-->
|
||||
|
||||
<solr>
|
||||
|
||||
<str name="shareSchema">${shareSchema:false}</str>
|
||||
<str name="configSetBaseDir">${configSetBaseDir:configsets}</str>
|
||||
<str name="coreRootDirectory">${coreRootDirectory:.}</str>
|
||||
|
||||
<solrcloud>
|
||||
<str name="host">127.0.0.1</str>
|
||||
<str name="hostContext">${hostContext:solr}</str>
|
||||
<int name="hostPort">${hostPort:8983}</int>
|
||||
<int name="zkClientTimeout">${solr.zkclienttimeout:30000}</int>
|
||||
<bool name="genericCoreNodeNames">${genericCoreNodeNames:true}</bool>
|
||||
<int name="distribUpdateConnTimeout">${distribUpdateConnTimeout:45000}</int>
|
||||
<int name="distribUpdateSoTimeout">${distribUpdateSoTimeout:340000}</int>
|
||||
<int name="autoReplicaFailoverWaitAfterExpiration">${autoReplicaFailoverWaitAfterExpiration:10000}</int>
|
||||
<int name="autoReplicaFailoverWorkLoopDelay">${autoReplicaFailoverWorkLoopDelay:10000}</int>
|
||||
<int name="autoReplicaFailoverBadNodeExpiration">${autoReplicaFailoverBadNodeExpiration:60000}</int>
|
||||
</solrcloud>
|
||||
|
||||
<shardHandlerFactory name="shardHandlerFactory"
|
||||
class="HttpShardHandlerFactory">
|
||||
<str name="urlScheme">${urlScheme:}</str>
|
||||
<int name="socketTimeout">${socketTimeout:90000}</int>
|
||||
<int name="connTimeout">${connTimeout:15000}</int>
|
||||
</shardHandlerFactory>
|
||||
|
||||
</solr>
|
|
@ -40,6 +40,9 @@
|
|||
<int name="leaderVoteWait">${leaderVoteWait:10000}</int>
|
||||
<int name="distribUpdateConnTimeout">${distribUpdateConnTimeout:45000}</int>
|
||||
<int name="distribUpdateSoTimeout">${distribUpdateSoTimeout:340000}</int>
|
||||
<int name="autoReplicaFailoverWaitAfterExpiration">${autoReplicaFailoverWaitAfterExpiration:10000}</int>
|
||||
<int name="autoReplicaFailoverWorkLoopDelay">${autoReplicaFailoverWorkLoopDelay:10000}</int>
|
||||
<int name="autoReplicaFailoverBadNodeExpiration">${autoReplicaFailoverBadNodeExpiration:60000}</int>
|
||||
</solrcloud>
|
||||
|
||||
</solr>
|
||||
|
|
|
@ -29,7 +29,7 @@ import org.junit.Test;
|
|||
public class CollectionStateFormat2Test extends AbstractFullDistribZkTestBase {
|
||||
|
||||
protected String getSolrXml() {
|
||||
return "solr-no-core.xml";
|
||||
return "solr.xml";
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -144,7 +144,7 @@ public class CollectionsAPIDistributedZkTest extends AbstractFullDistribZkTestBa
|
|||
}
|
||||
|
||||
protected String getSolrXml() {
|
||||
return "solr-no-core.xml";
|
||||
return "solr.xml";
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@ public class CustomCollectionTest extends AbstractFullDistribZkTestBase {
|
|||
private static final boolean DEBUG = false;
|
||||
|
||||
protected String getSolrXml() {
|
||||
return "solr-no-core.xml";
|
||||
return "solr.xml";
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -50,7 +50,7 @@ public class DeleteLastCustomShardedReplicaTest extends AbstractFullDistribZkTes
|
|||
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
|
||||
|
||||
protected String getSolrXml() {
|
||||
return "solr-no-core.xml";
|
||||
return "solr.xml";
|
||||
}
|
||||
|
||||
public DeleteLastCustomShardedReplicaTest() {
|
||||
|
|
|
@ -57,7 +57,7 @@ public class DeleteReplicaTest extends AbstractFullDistribZkTestBase {
|
|||
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
|
||||
|
||||
protected String getSolrXml() {
|
||||
return "solr-no-core.xml";
|
||||
return "solr.xml";
|
||||
}
|
||||
|
||||
public DeleteReplicaTest() {
|
||||
|
|
|
@ -58,7 +58,7 @@ public class OverseerRolesTest extends AbstractFullDistribZkTestBase{
|
|||
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
|
||||
|
||||
protected String getSolrXml() {
|
||||
return "solr-no-core.xml";
|
||||
return "solr.xml";
|
||||
}
|
||||
|
||||
public OverseerRolesTest() {
|
||||
|
|
|
@ -90,7 +90,7 @@ public class SharedFSAutoReplicaFailoverTest extends AbstractFullDistribZkTestBa
|
|||
}
|
||||
|
||||
protected String getSolrXml() {
|
||||
return "solr-no-core.xml";
|
||||
return "solr.xml";
|
||||
}
|
||||
|
||||
|
||||
|
@ -219,7 +219,7 @@ public class SharedFSAutoReplicaFailoverTest extends AbstractFullDistribZkTestBa
|
|||
|
||||
ChaosMonkey.stop(jettys.get(3));
|
||||
|
||||
//solr-no-core.xml has defined workLoopDelay=10s and waitAfterExpiration=10s
|
||||
//solr.xml has defined workLoopDelay=10s and waitAfterExpiration=10s
|
||||
//Hence waiting for 30 seconds to be on the safe side.
|
||||
Thread.sleep(30000);
|
||||
//Ensures that autoAddReplicas has not kicked in.
|
||||
|
|
|
@ -471,7 +471,7 @@ public class TestMiniSolrCloudCluster extends LuceneTestCase {
|
|||
|
||||
final SegmentTerminateEarlyTestState tstes = new SegmentTerminateEarlyTestState();
|
||||
|
||||
File solrXml = new File(SolrTestCaseJ4.TEST_HOME(), "solr-no-core.xml");
|
||||
File solrXml = new File(SolrTestCaseJ4.TEST_HOME(), "solr.xml");
|
||||
Builder jettyConfig = JettyConfig.builder();
|
||||
jettyConfig.waitForLoadingCoresToFinish(null);
|
||||
final MiniSolrCloudCluster miniCluster = createMiniSolrCloudCluster();
|
||||
|
|
|
@ -54,7 +54,7 @@ import java.util.concurrent.TimeUnit;
|
|||
public class UnloadDistributedZkTest extends BasicDistributedZkTest {
|
||||
|
||||
protected String getSolrXml() {
|
||||
return "solr-no-core.xml";
|
||||
return "solr.xml";
|
||||
}
|
||||
|
||||
public UnloadDistributedZkTest() {
|
||||
|
|
|
@ -61,7 +61,7 @@ public class HdfsNNFailoverTest extends BasicDistributedZkTest {
|
|||
}
|
||||
|
||||
protected String getSolrXml() {
|
||||
return "solr-no-core.xml";
|
||||
return "solr.xml";
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -86,7 +86,7 @@ public class HdfsWriteToMultipleCollectionsTest extends BasicDistributedZkTest {
|
|||
}
|
||||
|
||||
protected String getSolrXml() {
|
||||
return "solr-no-core.xml";
|
||||
return "solr.xml";
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -91,7 +91,7 @@ public class StressHdfsTest extends BasicDistributedZkTest {
|
|||
}
|
||||
|
||||
protected String getSolrXml() {
|
||||
return "solr-no-core.xml";
|
||||
return "solr.xml";
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -248,7 +248,7 @@ public class CoreAdminHandlerTest extends SolrTestCaseJ4 {
|
|||
File solrHomeDirectory = new File(initCoreDataDir, getClass().getName() + "-corex-"
|
||||
+ System.nanoTime());
|
||||
solrHomeDirectory.mkdirs();
|
||||
copySolrHomeToTemp(solrHomeDirectory, "corex", true);
|
||||
copySolrHomeToTemp(solrHomeDirectory, "corex");
|
||||
File corex = new File(solrHomeDirectory, "corex");
|
||||
FileUtils.write(new File(corex, "core.properties"), "", Charsets.UTF_8.toString());
|
||||
JettySolrRunner runner = new JettySolrRunner(solrHomeDirectory.getAbsolutePath(), buildJettyConfig("/solr"));
|
||||
|
|
|
@ -1855,21 +1855,14 @@ public abstract class SolrTestCaseJ4 extends LuceneTestCase {
|
|||
}
|
||||
|
||||
// Creates a consistent configuration, _including_ solr.xml at dstRoot. Creates collection1/conf and copies
|
||||
// the stock files in there. Seems to be indicated for some tests when we remove the default, hard-coded
|
||||
// solr.xml from being automatically synthesized from SolrConfigXmlOld.DEFAULT_SOLR_XML.
|
||||
// the stock files in there.
|
||||
|
||||
public static void copySolrHomeToTemp(File dstRoot, String collection) throws IOException {
|
||||
copySolrHomeToTemp(dstRoot, collection, false);
|
||||
}
|
||||
public static void copySolrHomeToTemp(File dstRoot, String collection, boolean newStyle) throws IOException {
|
||||
if (!dstRoot.exists()) {
|
||||
assertTrue("Failed to make subdirectory ", dstRoot.mkdirs());
|
||||
}
|
||||
|
||||
if (newStyle) {
|
||||
FileUtils.copyFile(new File(SolrTestCaseJ4.TEST_HOME(), "solr-no-core.xml"), new File(dstRoot, "solr.xml"));
|
||||
} else {
|
||||
FileUtils.copyFile(new File(SolrTestCaseJ4.TEST_HOME(), "solr.xml"), new File(dstRoot, "solr.xml"));
|
||||
}
|
||||
FileUtils.copyFile(new File(SolrTestCaseJ4.TEST_HOME(), "solr.xml"), new File(dstRoot, "solr.xml"));
|
||||
|
||||
File subHome = new File(dstRoot, collection + File.separator + "conf");
|
||||
String top = SolrTestCaseJ4.TEST_HOME() + "/collection1/conf";
|
||||
|
|
Loading…
Reference in New Issue