fix intermittent test failure: make sure reader pooling is on before we start the index threads

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1349897 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2012-06-13 15:03:53 +00:00
parent a71c3e7147
commit 6071ad98c1
1 changed files with 8 additions and 0 deletions

View File

@ -89,6 +89,14 @@ public class TestNRTThreads extends ThreadedIndexingAndSearchingTestCase {
assertFalse("saw non-zero open-but-deleted count", anyOpenDelFiles); 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; private IndexSearcher fixedSearcher;
protected IndexSearcher getCurrentSearcher() throws Exception { protected IndexSearcher getCurrentSearcher() throws Exception {