mirror of https://github.com/apache/lucene.git
tests: close update handlers created outside of solr
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@927058 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ba6bfab9b8
commit
954add8c31
|
@ -30,28 +30,36 @@ public class TestPropInject extends AbstractSolrTestCase {
|
|||
return writer;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void testMergePolicy() throws Exception {
|
||||
IndexWriter writer = new ExposeWriterHandler().getWriter();
|
||||
ExposeWriterHandler uh = new ExposeWriterHandler();
|
||||
IndexWriter writer = uh.getWriter();
|
||||
LogByteSizeMergePolicy mp = (LogByteSizeMergePolicy)writer.getMergePolicy();
|
||||
assertEquals(64.0, mp.getMaxMergeMB());
|
||||
uh.close();
|
||||
}
|
||||
|
||||
public void testMergePolicyDefaults() throws Exception {
|
||||
IndexWriter writer = new ExposeWriterHandler().getWriter();
|
||||
ExposeWriterHandler uh = new ExposeWriterHandler();
|
||||
IndexWriter writer = uh.getWriter();
|
||||
LogByteSizeMergePolicy mp = (LogByteSizeMergePolicy)writer.getMergePolicy();
|
||||
assertEquals(32.0, mp.getMaxMergeMB());
|
||||
uh.close();
|
||||
}
|
||||
|
||||
public void testProps() throws Exception {
|
||||
IndexWriter writer = new ExposeWriterHandler().getWriter();
|
||||
ExposeWriterHandler uh = new ExposeWriterHandler();
|
||||
IndexWriter writer = uh.getWriter();
|
||||
ConcurrentMergeScheduler cms = (ConcurrentMergeScheduler)writer.getMergeScheduler();
|
||||
assertEquals(2, cms.getMaxThreadCount());
|
||||
uh.close();
|
||||
}
|
||||
|
||||
public void testPropsDefaults() throws Exception {
|
||||
IndexWriter writer = new ExposeWriterHandler().getWriter();
|
||||
ExposeWriterHandler uh = new ExposeWriterHandler();
|
||||
IndexWriter writer = uh.getWriter();
|
||||
ConcurrentMergeScheduler cms = (ConcurrentMergeScheduler)writer.getMergeScheduler();
|
||||
assertEquals(4, cms.getMaxThreadCount());
|
||||
uh.close();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue