lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r1349897 - /lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNRTThreads.java
Date Wed, 13 Jun 2012 15:03:53 GMT
Author: mikemccand
Date: Wed Jun 13 15:03:53 2012
New Revision: 1349897

URL: http://svn.apache.org/viewvc?rev=1349897&view=rev
Log:
fix intermittent test failure: make sure reader pooling is on before we start the index threads

Modified:
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNRTThreads.java

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNRTThreads.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNRTThreads.java?rev=1349897&r1=1349896&r2=1349897&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNRTThreads.java (original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/index/TestNRTThreads.java Wed
Jun 13 15:03:53 2012
@@ -89,6 +89,14 @@ public class TestNRTThreads extends Thre
     assertFalse("saw non-zero open-but-deleted count", anyOpenDelFiles);
   }
 
+  @Override
+  protected void doAfterWriter(ExecutorService es) throws Exception {
+    // Force writer to do reader pooling, always, so that
+    // all merged segments, even for merges before
+    // doSearching is called, are warmed:
+    writer.getReader().close();
+  }
+  
   private IndexSearcher fixedSearcher;
 
   protected IndexSearcher getCurrentSearcher() throws Exception {



Mime
View raw message