prevent false failure from running out of file descriptors

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@999545 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2010-09-21 19:04:26 +00:00
parent bad321b625
commit 59d4f2c3ca
1 changed files with 5 additions and 0 deletions

View File

@ -2115,6 +2115,11 @@ public class TestIndexWriter extends LuceneTestCase {
IndexWriter writer = new IndexWriter(directory, conf);
((LogMergePolicy) writer.getConfig().getMergePolicy()).setMergeFactor(100);
// have to use compound file to prevent running out of
// descripters when newDirectory returns a file-system
// backed directory:
((LogMergePolicy) writer.getConfig().getMergePolicy()).setUseCompoundFile(true);
//System.out.println("TEST: pass=" + pass + " cms=" + (pass >= 2));
for(int iter=0;iter<10;iter++) {
//System.out.println("TEST: iter=" + iter);