mirror of https://github.com/apache/lucene.git
tests: fix leak of test harness
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1022730 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c7720b369c
commit
62ef53cdd0
|
@ -48,15 +48,16 @@ public class TestArbitraryIndexDir extends AbstractSolrTestCase{
|
||||||
|
|
||||||
public void setUp() throws Exception {
|
public void setUp() throws Exception {
|
||||||
super.setUp();
|
super.setUp();
|
||||||
|
|
||||||
dataDir = new File(TEMP_DIR,
|
dataDir = new File(TEMP_DIR,
|
||||||
getClass().getName() + "-" + System.currentTimeMillis() + System.getProperty("file.separator") + "solr"
|
getClass().getName() + "-" + System.currentTimeMillis() + System.getProperty("file.separator") + "solr"
|
||||||
+ System.getProperty("file.separator") + "data");
|
+ System.getProperty("file.separator") + "data");
|
||||||
dataDir.mkdirs();
|
dataDir.mkdirs();
|
||||||
|
|
||||||
solrConfig = h.createConfig(getSolrConfigFile());
|
solrConfig = h.createConfig("solrconfig.xml");
|
||||||
h = new TestHarness( dataDir.getAbsolutePath(),
|
h = new TestHarness( dataDir.getAbsolutePath(),
|
||||||
solrConfig,
|
solrConfig,
|
||||||
getSchemaFile());
|
"schema12.xml");
|
||||||
lrf = h.getRequestFactory
|
lrf = h.getRequestFactory
|
||||||
("standard",0,20,"version","2.2");
|
("standard",0,20,"version","2.2");
|
||||||
}
|
}
|
||||||
|
@ -68,12 +69,12 @@ public class TestArbitraryIndexDir extends AbstractSolrTestCase{
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getSchemaFile() {
|
public String getSchemaFile() {
|
||||||
return "schema12.xml";
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getSolrConfigFile() {
|
public String getSolrConfigFile() {
|
||||||
return "solrconfig.xml";
|
return null; // prevent superclass from creating it's own TestHarness
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Reference in New Issue