fix setting of solr.solr.home

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@927637 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2010-03-25 23:23:11 +00:00
parent b42b2d9241
commit cec08f1741
2 changed files with 10 additions and 2 deletions

View File

@ -77,9 +77,17 @@ public class SolrTestCaseJ4 extends LuceneTestCaseJ4 {
/** Call initCore in @BeforeClass to instantiate a solr core in your test class.
* deleteCore will be called for you via SolrTestCaseJ4 @AfterClass */
public static void initCore(String config, String schema) throws Exception {
//ignoreException("ignore_exception");
initCore(config, schema, null);
}
/** Call initCore in @BeforeClass to instantiate a solr core in your test class.
* deleteCore will be called for you via SolrTestCaseJ4 @AfterClass */
public static void initCore(String config, String schema, String solrHome) throws Exception {
configString = config;
schemaString = schema;
if (solrHome != null) {
System.setProperty("solr.solr.home", solrHome);
}
initCore();
}

View File

@ -31,7 +31,7 @@ public class SolrExampleEmbeddedTest extends SolrExampleTests {
@BeforeClass
public static void beforeTest() throws Exception {
initCore(EXAMPLE_CONFIG, EXAMPLE_SCHEMA);
initCore(EXAMPLE_CONFIG, EXAMPLE_SCHEMA, EXAMPLE_HOME);
}
@Override