From 6edd62d43340eb01df38cd9942ded7b8192c0602 Mon Sep 17 00:00:00 2001 From: "Chris M. Hostetter" Date: Tue, 13 Aug 2013 23:20:31 +0000 Subject: [PATCH] SOLR-4952: solrconfig.snippet.randomindexconfig.xml used in more configs, including eliminating TestPluginEnable and folding it into TestConfig git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1513691 13f79535-47bb-0310-9956-ffa450edef68 --- .../conf/solrconfig-enableplugin.xml | 63 ------------------- .../collection1/conf/solrconfig-test-misc.xml | 6 ++ .../solr/collection1/conf/solrconfig-tlog.xml | 5 +- .../collection1/conf/solrconfig-warmer.xml | 16 ++++- .../org/apache/solr/TestPluginEnable.java | 41 ------------ .../test/org/apache/solr/core/TestConfig.java | 5 ++ 6 files changed, 27 insertions(+), 109 deletions(-) delete mode 100644 solr/core/src/test-files/solr/collection1/conf/solrconfig-enableplugin.xml delete mode 100644 solr/core/src/test/org/apache/solr/TestPluginEnable.java diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-enableplugin.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-enableplugin.xml deleted file mode 100644 index 2d563d6266a..00000000000 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-enableplugin.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - ${tests.luceneMatchVersion:LUCENE_CURRENT} - ${solr.data.dir:} - - - - - - single - ${useCompoundFile:false} - - - - - - - true - - - - - - - - - - - - - - - - - - - - - max-age=30, public - - - - diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-test-misc.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-test-misc.xml index 4af9f371c8c..07ae132fe07 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-test-misc.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-test-misc.xml @@ -45,4 +45,10 @@ prefix-${solr.test.sys.prop2}-suffix + + + + + + diff --git a/solr/core/src/test-files/solr/collection1/conf/solrconfig-tlog.xml b/solr/core/src/test-files/solr/collection1/conf/solrconfig-tlog.xml index 2cacb5ae412..d55845c13d0 100644 --- a/solr/core/src/test-files/solr/collection1/conf/solrconfig-tlog.xml +++ b/solr/core/src/test-files/solr/collection1/conf/solrconfig-tlog.xml @@ -32,10 +32,7 @@ ${solr.data.dir:} - - ${solr.lock.type:native} - ${useCompoundFile:false} - + + + + ${useCompoundFile} + ${solr.tests.maxBufferedDocs} + ${solr.tests.maxIndexingThreads} + ${solr.tests.ramBufferSizeMB} + + 1000 + 10000 + single diff --git a/solr/core/src/test/org/apache/solr/TestPluginEnable.java b/solr/core/src/test/org/apache/solr/TestPluginEnable.java deleted file mode 100644 index d2505c19220..00000000000 --- a/solr/core/src/test/org/apache/solr/TestPluginEnable.java +++ /dev/null @@ -1,41 +0,0 @@ -package org.apache.solr; - -/* - * 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. - */ - -import org.apache.solr.client.solrj.SolrServerException; -import org.junit.BeforeClass; -import org.junit.Test; -/** - *

Test disabling components

- * - * - * @since solr 1.4 - */ -public class TestPluginEnable extends SolrTestCaseJ4 { - @BeforeClass - public static void beforeClass() throws Exception { - initCore("solrconfig-enableplugin.xml", "schema-replication1.xml"); - } - - @Test - public void testSimple() throws SolrServerException { - assertNull(h.getCore().getRequestHandler("disabled")); - assertNotNull(h.getCore().getRequestHandler("enabled")); - - } -} diff --git a/solr/core/src/test/org/apache/solr/core/TestConfig.java b/solr/core/src/test/org/apache/solr/core/TestConfig.java index 8eace48b279..8f065f49b96 100644 --- a/solr/core/src/test/org/apache/solr/core/TestConfig.java +++ b/solr/core/src/test/org/apache/solr/core/TestConfig.java @@ -70,6 +70,11 @@ public class TestConfig extends SolrTestCaseJ4 { assertNull("should not have been able to find " + f, data); } } + @Test + public void testDisableRequetsHandler() throws Exception { + assertNull(h.getCore().getRequestHandler("disabled")); + assertNotNull(h.getCore().getRequestHandler("enabled")); + } @Test public void testJavaProperty() {