mirror of https://github.com/apache/lucene.git
evil up this test a bit
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1508162 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
02a2f383b2
commit
9196c5fa97
|
@ -355,9 +355,12 @@ public abstract class BasePostingsFormatTestCase extends LuceneTestCase {
|
|||
fields.put(field, postings);
|
||||
Set<String> seenTerms = new HashSet<String>();
|
||||
|
||||
// TODO:
|
||||
//final int numTerms = atLeast(10);
|
||||
final int numTerms = 4;
|
||||
int numTerms;
|
||||
if (random().nextInt(10) == 7) {
|
||||
numTerms = atLeast(50);
|
||||
} else {
|
||||
numTerms = _TestUtil.nextInt(random(), 2, 20);
|
||||
}
|
||||
|
||||
for(int termUpto=0;termUpto<numTerms;termUpto++) {
|
||||
String term = _TestUtil.randomSimpleString(random());
|
||||
|
@ -597,6 +600,10 @@ public abstract class BasePostingsFormatTestCase extends LuceneTestCase {
|
|||
System.out.println(" verifyEnum: options=" + options + " maxTestOptions=" + maxTestOptions);
|
||||
}
|
||||
|
||||
// Make sure TermsEnum really is positioned on the
|
||||
// expected term:
|
||||
assertEquals(term, termsEnum.term());
|
||||
|
||||
// 50% of the time time pass liveDocs:
|
||||
boolean useLiveDocs = options.contains(Option.LIVE_DOCS) && random().nextBoolean();
|
||||
Bits liveDocs;
|
||||
|
|
Loading…
Reference in New Issue