diff --git a/solr/core/src/test/org/apache/solr/schema/TestSchemaManager.java b/solr/core/src/test/org/apache/solr/schema/TestSchemaManager.java index a6f7fc48c58..d4e68e6d2ea 100644 --- a/solr/core/src/test/org/apache/solr/schema/TestSchemaManager.java +++ b/solr/core/src/test/org/apache/solr/schema/TestSchemaManager.java @@ -18,11 +18,15 @@ package org.apache.solr.schema; import org.apache.solr.SolrTestCaseJ4; import org.apache.solr.common.util.CommandOperation; +import org.apache.solr.core.SolrConfig; +import org.apache.solr.util.TestHarness; import org.junit.BeforeClass; +import org.junit.Ignore; import org.junit.Test; import java.io.IOException; import java.io.StringReader; +import java.util.Arrays; import java.util.List; public class TestSchemaManager extends SolrTestCaseJ4 { @@ -70,4 +74,16 @@ public class TestSchemaManager extends SolrTestCaseJ4 { assertEquals(2,ops.size()); assertTrue(CommandOperation.captureErrors(ops).isEmpty()); } + + @Test + @Ignore + public void testSchemaLoadingPerf() { + SolrConfig config = TestHarness.createConfig(testSolrHome, "collection1", "solrconfig.xml"); + List names = Arrays.asList("schema.xml", "schema11.xml", "schema12.xml", "schema15.xml"); + long start = System.currentTimeMillis(); + for (String name : names) { + IndexSchema schema = IndexSchemaFactory.buildIndexSchema(name, config); + } + System.out.println("time taken : "+ (System.currentTimeMillis() -start)); + } }