LUCENE-3667: fix broken test optimization (when n > 1000)

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1226455 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2012-01-02 16:16:34 +00:00
parent 33a3c50b02
commit a4fc20d91e
1 changed files with 2 additions and 2 deletions

View File

@ -455,8 +455,8 @@ public class TestIndexWriter extends LuceneTestCase {
IndexReader reader = IndexReader.open(dir);
IndexSearcher searcher = new IndexSearcher(reader);
ScoreDoc[] hits = searcher.search(new TermQuery(new Term("field", "aaa")), null, 1000).scoreDocs;
assertEquals(n*100, hits.length);
int totalHits = searcher.search(new TermQuery(new Term("field", "aaa")), null, 1).totalHits;
assertEquals(n*100, totalHits);
reader.close();
dir.close();