SOLR-9277: Clean up some more remnants of supporting old and new style solr.xml in tests

This commit is contained in:
Erick 2016-07-06 19:51:06 -07:00
parent 2bd6c4ecd7
commit 7743718d29
17 changed files with 22 additions and 69 deletions

View File

@ -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.

View File

@ -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>

View File

@ -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>

View File

@ -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

View File

@ -144,7 +144,7 @@ public class CollectionsAPIDistributedZkTest extends AbstractFullDistribZkTestBa
}
protected String getSolrXml() {
return "solr-no-core.xml";
return "solr.xml";
}

View File

@ -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";
}

View File

@ -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() {

View File

@ -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() {

View File

@ -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() {

View File

@ -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.

View File

@ -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();

View File

@ -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() {

View File

@ -61,7 +61,7 @@ public class HdfsNNFailoverTest extends BasicDistributedZkTest {
}
protected String getSolrXml() {
return "solr-no-core.xml";
return "solr.xml";
}
@Test

View File

@ -86,7 +86,7 @@ public class HdfsWriteToMultipleCollectionsTest extends BasicDistributedZkTest {
}
protected String getSolrXml() {
return "solr-no-core.xml";
return "solr.xml";
}
@Test

View File

@ -91,7 +91,7 @@ public class StressHdfsTest extends BasicDistributedZkTest {
}
protected String getSolrXml() {
return "solr-no-core.xml";
return "solr.xml";
}
@Test

View File

@ -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"));

View File

@ -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";