Skip to content

Apache Lucene open-source search software

SOLR-11008: Use a lighter config for MetricsHandlerTest and ensure the core is up before the test starts

Varun Thacker7c4584bd4f14
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txt
index 74684514c6a..9c807739201 100644
--- a/solr/CHANGES.txt
+++ b/solr/CHANGES.txt
@@ -282,6 +282,8 @@ Other Changes
* SOLR-12617: Remove Commons BeanUtils as a dependency (Varun Thacker)
+* SOLR-11008: Use a lighter config for MetricsHandlerTest and ensure the core is up before the test starts (Varun Thacker)
+
================== 7.4.0 ==================
Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.
diff --git a/solr/core/src/test/org/apache/solr/handler/admin/MetricsHandlerTest.java b/solr/core/src/test/org/apache/solr/handler/admin/MetricsHandlerTest.java
index 0fe5ad75fc6..1730355ab50 100644
--- a/solr/core/src/test/org/apache/solr/handler/admin/MetricsHandlerTest.java
+++ b/solr/core/src/test/org/apache/solr/handler/admin/MetricsHandlerTest.java
@@ -35,7 +35,9 @@ public class MetricsHandlerTest extends SolrTestCaseJ4 {
@BeforeClass
public static void beforeClass() throws Exception {
- initCore("solrconfig.xml", "schema.xml");
+ initCore("solrconfig-minimal.xml", "schema.xml");
+ h.getCoreContainer().waitForLoadingCoresToFinish(30000);
+
// manually register some metrics in solr.jvm and solr.jetty - TestHarness doesn't init them
Counter c = h.getCoreContainer().getMetricManager().counter(null, "solr.jvm", "foo");
c.inc();