lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yo...@apache.org
Subject svn commit: r927058 - /lucene/dev/trunk/solr/src/test/org/apache/solr/core/TestPropInject.java
Date Wed, 24 Mar 2010 13:58:42 GMT
Author: yonik
Date: Wed Mar 24 13:58:41 2010
New Revision: 927058

URL: http://svn.apache.org/viewvc?rev=927058&view=rev
Log:
tests: close update handlers created outside of solr

Modified:
    lucene/dev/trunk/solr/src/test/org/apache/solr/core/TestPropInject.java

Modified: lucene/dev/trunk/solr/src/test/org/apache/solr/core/TestPropInject.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/src/test/org/apache/solr/core/TestPropInject.java?rev=927058&r1=927057&r2=927058&view=diff
==============================================================================
--- lucene/dev/trunk/solr/src/test/org/apache/solr/core/TestPropInject.java (original)
+++ lucene/dev/trunk/solr/src/test/org/apache/solr/core/TestPropInject.java Wed Mar 24 13:58:41
2010
@@ -30,28 +30,36 @@ public class TestPropInject extends Abst
       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();
   }
 }



Mime
View raw message