AndreyBozhko commented on code in PR #2707:
URL: https://github.com/apache/solr/pull/2707#discussion_r1755401081


##########
solr/core/src/test/org/apache/solr/pkg/TestPackages.java:
##########
@@ -810,10 +813,18 @@ public void testSchemaPlugins() throws Exception {
             ":fieldType:_packageinfo_:version",
             "1.0"));
 
+    JettySolrRunner jetty =
+        cluster.getJettySolrRunners().stream()
+            .dropWhile(j -> j.getCoreContainer().getAllCoreNames().isEmpty())
+            .findFirst()
+            .orElseThrow();
+
+    IndexSchema schemaBeforePackageUpdate = withOnlyCoreInJetty(jetty, 
SolrCore::getLatestSchema);
+
     add = new PackagePayload.AddVersion();
     add.version = "2.0";
     add.pkg = "schemapkg";
-    add.files = Arrays.asList(FILE1);
+    add.files = Arrays.asList(FILE1, FILE2);

Review Comment:
   This test was always faulty - it attempts to register package version 2.0, 
but FILE1 jar does not have all necessary classes for that to ever work. So the 
async schema reload fails, and the core is still associated with the same 
instance of IndexSchema.
   
   I fixed the test, and added a new assertion to check that the core schema 
was indeed reloaded.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to