Apache Solr open-source search software
usage of package loaded class in the wrong tests
Noble Paulc10f47a3da2b
diff --git a/solr/core/src/test-files/solr/configsets/conf2/conf/solrconfig.xml b/solr/core/src/test-files/solr/configsets/conf2/conf/solrconfig.xmlindex e69d16ff17f..0b3ec4d24ce 100644--- a/solr/core/src/test-files/solr/configsets/conf2/conf/solrconfig.xml+++ b/solr/core/src/test-files/solr/configsets/conf2/conf/solrconfig.xml@@ -46,7 +46,7 @@</requestHandler><query><filterCache- class = "mypkg:org.apache.solr.search.CaffeineCache"+ class = "org.apache.solr.search.CaffeineCache"size="512"initialSize="512"autowarmCount="0" />diff --git a/solr/core/src/test-files/solr/configsets/conf3/schema.xml b/solr/core/src/test-files/solr/configsets/conf3/schema.xmlnew file mode 100644index 00000000000..85f7ed35453--- /dev/null+++ b/solr/core/src/test-files/solr/configsets/conf3/schema.xml@@ -0,0 +1,43 @@+<?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.+-->+<schema name="minimal" version="1.1">+ <fieldType name="string" class="solr.StrField"/>+ <fieldType name="int" class="${solr.tests.IntegerFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>+ <fieldType name="long" class="${solr.tests.LongFieldType}" docValues="${solr.tests.numeric.dv}" precisionStep="0" omitNorms="true" positionIncrementGap="0"/>+ <dynamicField name="*" type="string" indexed="true" stored="true"/>+ <!-- for versioning -->+ <field name="_version_" type="long" indexed="true" stored="true"/>+ <field name="_root_" type="string" indexed="true" stored="true" multiValued="false" required="false"/>+ <field name="id" type="string" indexed="true" stored="true"/>+ <dynamicField name="*_s" type="string" indexed="true" stored="true" />+ <uniqueKey>id</uniqueKey>+ <query>+ <filterCache+ size="0"+ initialSize="0"+ autowarmCount="0"/>+ <queryResultCache+ size="0"+ initialSize="0"+ autowarmCount="0"/>+ <documentCache+ size="0"+ initialSize="0"+ autowarmCount="0"/>+ </query>+</schema>diff --git a/solr/core/src/test-files/solr/configsets/conf3/solrconfig.xml b/solr/core/src/test-files/solr/configsets/conf3/solrconfig.xmlnew file mode 100644index 00000000000..e69d16ff17f--- /dev/null+++ b/solr/core/src/test-files/solr/configsets/conf3/solrconfig.xml@@ -0,0 +1,68 @@+<?xml version="1.0" ?>++<!--+ 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.+-->++<!-- Minimal solrconfig.xml with /select, /admin and /update only -->++<config>++ <dataDir>${solr.data.dir:}</dataDir>++ <directoryFactory name="DirectoryFactory"+ class="${solr.directoryFactory:solr.NRTCachingDirectoryFactory}"/>+ <schemaFactory class="ClassicIndexSchemaFactory"/>++ <luceneMatchVersion>${tests.luceneMatchVersion:LATEST}</luceneMatchVersion>++ <updateHandler class="solr.DirectUpdateHandler2">+ <commitWithin>+ <softCommit>${solr.commitwithin.softcommit:true}</softCommit>+ </commitWithin>+ <updateLog class="${solr.ulog:solr.UpdateLog}"></updateLog>+ </updateHandler>++ <requestHandler name="/select" class="solr.SearchHandler">+ <lst name="defaults">+ <str name="echoParams">explicit</str>+ <str name="indent">true</str>+ <str name="df">text</str>+ </lst>++ </requestHandler>+ <query>+ <filterCache+ class = "mypkg:org.apache.solr.search.CaffeineCache"+ size="512"+ initialSize="512"+ autowarmCount="0" />++ <queryResultCache+ size="512"+ initialSize="512"+ autowarmCount="0" />++ <documentCache+ size="512"+ initialSize="512"+ autowarmCount="0" />+ </query>+ <indexConfig>+ <mergeScheduler class="${solr.mscheduler:org.apache.lucene.index.ConcurrentMergeScheduler}"/>+ </indexConfig>+</config>+diff --git a/solr/core/src/test/org/apache/solr/cloud/PackageManagerCLITest.java b/solr/core/src/test/org/apache/solr/cloud/PackageManagerCLITest.javaindex 0980f31b5e2..96f1d78649d 100644--- a/solr/core/src/test/org/apache/solr/cloud/PackageManagerCLITest.java+++ b/solr/core/src/test/org/apache/solr/cloud/PackageManagerCLITest.java@@ -59,7 +59,7 @@ public class PackageManagerCLITest extends SolrCloudTestCase {.addConfig("conf1", TEST_PATH().resolve("configsets").resolve("cloud-minimal").resolve("conf")).addConfig(- "conf2", TEST_PATH().resolve("configsets").resolve("cloud-minimal").resolve("conf"))+ "conf3", TEST_PATH().resolve("configsets").resolve("cloud-minimal").resolve("conf")).configure();repositoryServer =@@ -103,7 +103,7 @@ public class PackageManagerCLITest extends SolrCloudTestCase {run(tool, new String[] {"-solrUrl", solrUrl, "list-installed"});CollectionAdminRequest.createCollection("abc", "conf1", 1, 1).process(cluster.getSolrClient());- CollectionAdminRequest.createCollection("def", "conf2", 1, 1).process(cluster.getSolrClient());+ CollectionAdminRequest.createCollection("def", "conf3", 1, 1).process(cluster.getSolrClient());String rhPath = "/mypath2";diff --git a/solr/core/src/test/org/apache/solr/pkg/TestPackages.java b/solr/core/src/test/org/apache/solr/pkg/TestPackages.javaindex f703f1ce741..fc925364759 100644--- a/solr/core/src/test/org/apache/solr/pkg/TestPackages.java+++ b/solr/core/src/test/org/apache/solr/pkg/TestPackages.java@@ -94,7 +94,7 @@ public class TestPackages extends SolrCloudTestCase {System.setProperty("enable.packages", "true");configureCluster(4).withJettyConfig(jetty -> jetty.enableV2(true))- .addConfig("conf", configset("conf2"))+ .addConfig("conf", configset("conf3")).addConfig("conf1", configset("schema-package")).configure();}