fix false intermittent test failure

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1039759 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2010-11-27 21:01:14 +00:00
parent cdab6ed653
commit d7fe260c11
1 changed files with 3 additions and 1 deletions

View File

@ -385,6 +385,8 @@ public class TestIndexWriterExceptions extends LuceneTestCase {
} }
}); });
conf.setMaxBufferedDocs(Math.max(3, conf.getMaxBufferedDocs()));
IndexWriter writer = new IndexWriter(dir, conf); IndexWriter writer = new IndexWriter(dir, conf);
Document doc = new Document(); Document doc = new Document();
@ -412,7 +414,7 @@ public class TestIndexWriterExceptions extends LuceneTestCase {
writer.close(); writer.close();
IndexReader reader = IndexReader.open(dir, true); IndexReader reader = IndexReader.open(dir, true);
final Term t = new Term("content", "aa"); final Term t = new Term("content", "aa");
assertEquals(reader.docFreq(t), 3); assertEquals(3, reader.docFreq(t));
// Make sure the doc that hit the exception was marked // Make sure the doc that hit the exception was marked
// as deleted: // as deleted: