You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by no...@apache.org on 2023/01/12 05:47:15 UTC

[solr] branch branch_9x updated: usage of package loaded class in the wrong tests

This is an automated email from the ASF dual-hosted git repository.

noble pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/branch_9x by this push:
     new 92dd93dd063 usage of package loaded class in the wrong tests
92dd93dd063 is described below

commit 92dd93dd063c2ce582efe183b8b51506ed9e41b7
Author: Noble Paul <no...@gmail.com>
AuthorDate: Thu Jan 12 16:46:11 2023 +1100

    usage of package loaded class in the wrong tests
---
 .../solr/configsets/conf2/conf/solrconfig.xml      |  2 +-
 .../test-files/solr/configsets/conf3/schema.xml    | 43 ++++++++++++++++++++++
 .../{conf2/conf => conf3}/solrconfig.xml           |  0
 .../apache/solr/cloud/PackageManagerCLITest.java   |  4 +-
 .../src/test/org/apache/solr/pkg/TestPackages.java |  2 +-
 5 files changed, 47 insertions(+), 4 deletions(-)

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.xml
index 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.xml
new file mode 100644
index 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/conf2/conf/solrconfig.xml b/solr/core/src/test-files/solr/configsets/conf3/solrconfig.xml
similarity index 100%
copy from solr/core/src/test-files/solr/configsets/conf2/conf/solrconfig.xml
copy to solr/core/src/test-files/solr/configsets/conf3/solrconfig.xml
diff --git a/solr/core/src/test/org/apache/solr/cloud/PackageManagerCLITest.java b/solr/core/src/test/org/apache/solr/cloud/PackageManagerCLITest.java
index 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.java
index 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();
   }