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
(cherry picked from commit 7743718
)
This commit is contained in:
parent
50a9153462
commit
602a72ddad
|
@ -100,6 +100,12 @@ Other Changes
|
||||||
|
|
||||||
* SOLR-8787: TestAuthenticationFramework should not extend TestMiniSolrCloudCluster. (Trey Cahill via shalin)
|
* SOLR-8787: TestAuthenticationFramework should not extend TestMiniSolrCloudCluster. (Trey Cahill via shalin)
|
||||||
|
|
||||||
|
* SOLR-9180: More comprehensive tests of psuedo-fields for RTG and SolrCloud requests (hossman)
|
||||||
|
|
||||||
|
* 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 ==================
|
================== 6.1.0 ==================
|
||||||
|
|
||||||
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
|
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="leaderVoteWait">${leaderVoteWait:10000}</int>
|
||||||
<int name="distribUpdateConnTimeout">${distribUpdateConnTimeout:45000}</int>
|
<int name="distribUpdateConnTimeout">${distribUpdateConnTimeout:45000}</int>
|
||||||
<int name="distribUpdateSoTimeout">${distribUpdateSoTimeout:340000}</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>
|
</solrcloud>
|
||||||
|
|
||||||
</solr>
|
</solr>
|
||||||
|
|
|
@ -29,7 +29,7 @@ import org.junit.Test;
|
||||||
public class CollectionStateFormat2Test extends AbstractFullDistribZkTestBase {
|
public class CollectionStateFormat2Test extends AbstractFullDistribZkTestBase {
|
||||||
|
|
||||||
protected String getSolrXml() {
|
protected String getSolrXml() {
|
||||||
return "solr-no-core.xml";
|
return "solr.xml";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -143,7 +143,7 @@ public class CollectionsAPIDistributedZkTest extends AbstractFullDistribZkTestBa
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String getSolrXml() {
|
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;
|
private static final boolean DEBUG = false;
|
||||||
|
|
||||||
protected String getSolrXml() {
|
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());
|
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
|
||||||
|
|
||||||
protected String getSolrXml() {
|
protected String getSolrXml() {
|
||||||
return "solr-no-core.xml";
|
return "solr.xml";
|
||||||
}
|
}
|
||||||
|
|
||||||
public DeleteLastCustomShardedReplicaTest() {
|
public DeleteLastCustomShardedReplicaTest() {
|
||||||
|
|
|
@ -57,7 +57,7 @@ public class DeleteReplicaTest extends AbstractFullDistribZkTestBase {
|
||||||
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
|
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
|
||||||
|
|
||||||
protected String getSolrXml() {
|
protected String getSolrXml() {
|
||||||
return "solr-no-core.xml";
|
return "solr.xml";
|
||||||
}
|
}
|
||||||
|
|
||||||
public DeleteReplicaTest() {
|
public DeleteReplicaTest() {
|
||||||
|
|
|
@ -58,7 +58,7 @@ public class OverseerRolesTest extends AbstractFullDistribZkTestBase{
|
||||||
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
|
private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());
|
||||||
|
|
||||||
protected String getSolrXml() {
|
protected String getSolrXml() {
|
||||||
return "solr-no-core.xml";
|
return "solr.xml";
|
||||||
}
|
}
|
||||||
|
|
||||||
public OverseerRolesTest() {
|
public OverseerRolesTest() {
|
||||||
|
|
|
@ -90,7 +90,7 @@ public class SharedFSAutoReplicaFailoverTest extends AbstractFullDistribZkTestBa
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String getSolrXml() {
|
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));
|
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.
|
//Hence waiting for 30 seconds to be on the safe side.
|
||||||
Thread.sleep(30000);
|
Thread.sleep(30000);
|
||||||
//Ensures that autoAddReplicas has not kicked in.
|
//Ensures that autoAddReplicas has not kicked in.
|
||||||
|
|
|
@ -471,7 +471,7 @@ public class TestMiniSolrCloudCluster extends LuceneTestCase {
|
||||||
|
|
||||||
final SegmentTerminateEarlyTestState tstes = new SegmentTerminateEarlyTestState();
|
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();
|
Builder jettyConfig = JettyConfig.builder();
|
||||||
jettyConfig.waitForLoadingCoresToFinish(null);
|
jettyConfig.waitForLoadingCoresToFinish(null);
|
||||||
final MiniSolrCloudCluster miniCluster = createMiniSolrCloudCluster();
|
final MiniSolrCloudCluster miniCluster = createMiniSolrCloudCluster();
|
||||||
|
|
|
@ -54,7 +54,7 @@ import java.util.concurrent.TimeUnit;
|
||||||
public class UnloadDistributedZkTest extends BasicDistributedZkTest {
|
public class UnloadDistributedZkTest extends BasicDistributedZkTest {
|
||||||
|
|
||||||
protected String getSolrXml() {
|
protected String getSolrXml() {
|
||||||
return "solr-no-core.xml";
|
return "solr.xml";
|
||||||
}
|
}
|
||||||
|
|
||||||
public UnloadDistributedZkTest() {
|
public UnloadDistributedZkTest() {
|
||||||
|
|
|
@ -61,7 +61,7 @@ public class HdfsNNFailoverTest extends BasicDistributedZkTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String getSolrXml() {
|
protected String getSolrXml() {
|
||||||
return "solr-no-core.xml";
|
return "solr.xml";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -86,7 +86,7 @@ public class HdfsWriteToMultipleCollectionsTest extends BasicDistributedZkTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String getSolrXml() {
|
protected String getSolrXml() {
|
||||||
return "solr-no-core.xml";
|
return "solr.xml";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -91,7 +91,7 @@ public class StressHdfsTest extends BasicDistributedZkTest {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected String getSolrXml() {
|
protected String getSolrXml() {
|
||||||
return "solr-no-core.xml";
|
return "solr.xml";
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
|
@ -248,7 +248,7 @@ public class CoreAdminHandlerTest extends SolrTestCaseJ4 {
|
||||||
File solrHomeDirectory = new File(initCoreDataDir, getClass().getName() + "-corex-"
|
File solrHomeDirectory = new File(initCoreDataDir, getClass().getName() + "-corex-"
|
||||||
+ System.nanoTime());
|
+ System.nanoTime());
|
||||||
solrHomeDirectory.mkdirs();
|
solrHomeDirectory.mkdirs();
|
||||||
copySolrHomeToTemp(solrHomeDirectory, "corex", true);
|
copySolrHomeToTemp(solrHomeDirectory, "corex");
|
||||||
File corex = new File(solrHomeDirectory, "corex");
|
File corex = new File(solrHomeDirectory, "corex");
|
||||||
FileUtils.write(new File(corex, "core.properties"), "", Charsets.UTF_8.toString());
|
FileUtils.write(new File(corex, "core.properties"), "", Charsets.UTF_8.toString());
|
||||||
JettySolrRunner runner = new JettySolrRunner(solrHomeDirectory.getAbsolutePath(), buildJettyConfig("/solr"));
|
JettySolrRunner runner = new JettySolrRunner(solrHomeDirectory.getAbsolutePath(), buildJettyConfig("/solr"));
|
||||||
|
|
|
@ -1854,21 +1854,14 @@ public abstract class SolrTestCaseJ4 extends LuceneTestCase {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Creates a consistent configuration, _including_ solr.xml at dstRoot. Creates collection1/conf and copies
|
// 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
|
// the stock files in there.
|
||||||
// solr.xml from being automatically synthesized from SolrConfigXmlOld.DEFAULT_SOLR_XML.
|
|
||||||
public static void copySolrHomeToTemp(File dstRoot, String collection) throws IOException {
|
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()) {
|
if (!dstRoot.exists()) {
|
||||||
assertTrue("Failed to make subdirectory ", dstRoot.mkdirs());
|
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");
|
File subHome = new File(dstRoot, collection + File.separator + "conf");
|
||||||
String top = SolrTestCaseJ4.TEST_HOME() + "/collection1/conf";
|
String top = SolrTestCaseJ4.TEST_HOME() + "/collection1/conf";
|
||||||
|
|
Loading…
Reference in New Issue