SOLR-1830: fix test case not closing writer

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/branches/newtrunk@924652 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2010-03-18 05:56:34 +00:00
parent 10849197a2
commit 097709a317
1 changed files with 7 additions and 5 deletions

View File

@ -115,11 +115,13 @@ public class BasicFunctionalityTest extends AbstractSolrTestCase {
}
public void testSomeStuff() throws Exception {
// test merge factor picked up
SolrCore core = h.getCore();
SolrIndexWriter writer = new SolrIndexWriter("testWriter",core.getNewIndexDir(), core.getDirectoryFactory(), false, core.getSchema(), core.getSolrConfig().mainIndexConfig, core.getDeletionPolicy());
assertEquals("Mergefactor was not picked up", writer.getMergeFactor(), 8);
// test merge factor picked up
SolrCore core = h.getCore();
SolrIndexWriter writer = new SolrIndexWriter("testWriter",core.getNewIndexDir(), core.getDirectoryFactory(), false, core.getSchema(), core.getSolrConfig().mainIndexConfig, core.getDeletionPolicy());
assertEquals("Mergefactor was not picked up", writer.getMergeFactor(), 8);
writer.close();
lrf.args.put("version","2.0");
assertQ("test query on empty index",
req("qlkciyopsbgzyvkylsjhchghjrdf")