mirror of https://github.com/apache/lucene.git
increase test coverage
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1214012 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1a4c0ff254
commit
3550d35822
|
@ -60,6 +60,11 @@ public class TestSearchAfter extends LuceneTestCase {
|
|||
}
|
||||
|
||||
public void testQueries() throws Exception {
|
||||
// because the first page has a null 'after', we get a normal collector.
|
||||
// so we need to run the test a few times to ensure we will collect multiple
|
||||
// pages.
|
||||
int n = atLeast(10);
|
||||
for (int i = 0; i < n; i++) {
|
||||
Filter odd = new QueryWrapperFilter(new TermQuery(new Term("oddeven", "odd")));
|
||||
assertQuery(new MatchAllDocsQuery(), null);
|
||||
assertQuery(new TermQuery(new Term("english", "one")), null);
|
||||
|
@ -70,6 +75,7 @@ public class TestSearchAfter extends LuceneTestCase {
|
|||
bq.add(new TermQuery(new Term("oddeven", "even")), BooleanClause.Occur.SHOULD);
|
||||
assertQuery(bq, null);
|
||||
}
|
||||
}
|
||||
|
||||
void assertQuery(Query query, Filter filter) throws Exception {
|
||||
int maxDoc = searcher.getIndexReader().maxDoc();
|
||||
|
|
Loading…
Reference in New Issue