Example usage for org.apache.solr SolrTestCaseJ4 initCore

List of usage examples for org.apache.solr SolrTestCaseJ4 initCore

Introduction

In this page you can find the example usage for org.apache.solr SolrTestCaseJ4 initCore.

Prototype

public static void initCore(String config, String schema, String solrHome, String pCoreName) throws Exception 

Source Link

Document

Call initCore in @BeforeClass to instantiate a solr core in your test class.

Usage

From source file:se.simonsoft.cms.indexing.xml.solr.CoreReposxmlIntegrationTest.java

License:Apache License

@BeforeClass
public static void beforeTests() throws Exception {
    testhome = File.createTempFile("test", CoreReposxmlIntegrationTest.getClassName());
    Core core = new SolrCoreSetup(testhome).getCore("reposxml");
    try {//from  w w w  .  j a va 2 s . co m
        SolrTestCaseJ4.initCore(core.getSolrconfig(), core.getSchema(), testhome.getPath(), core.getName());
    } catch (Exception e) {
        System.out.println("getSolrConfigFile()=" + getSolrConfigFile());
        System.out.println("testSolrHome=" + testSolrHome);
        throw e;
    }
}