tests: close writer

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1026610 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2010-10-23 12:21:21 +00:00
parent ac71187c4e
commit fe1d16ee68
1 changed files with 3 additions and 1 deletions

View File

@ -18,9 +18,11 @@ public class TestLegacyMergeSchedulerPolicyConfig extends SolrTestCaseJ4 {
@Test
public void testLegacy() throws Exception {
IndexWriter writer = new ExposeWriterHandler().getWriter();
ExposeWriterHandler duh = new ExposeWriterHandler();
IndexWriter writer = duh.getWriter();
assertTrue(writer.getMergePolicy().getClass().getName().equals(LogDocMergePolicy.class.getName()));
assertTrue(writer.getMergeScheduler().getClass().getName().equals(SerialMergeScheduler.class.getName()));
duh.close();
}
class ExposeWriterHandler extends DirectUpdateHandler2 {