LUCENE-2858: fix test

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene2858@1237351 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2012-01-29 17:07:33 +00:00
parent 827d2f8c4a
commit 1a9e9a4d49
1 changed files with 2 additions and 2 deletions

View File

@ -57,7 +57,7 @@ public class TestStressAdvance extends LuceneTestCase {
final List<Integer> aDocIDs = new ArrayList<Integer>();
final List<Integer> bDocIDs = new ArrayList<Integer>();
final IndexReader r = w.getReader();
final DirectoryReader r = w.getReader();
final int[] idToDocID = new int[r.maxDoc()];
for(int docID=0;docID<idToDocID.length;docID++) {
int id = Integer.parseInt(r.document(docID).get("id"));
@ -67,7 +67,7 @@ public class TestStressAdvance extends LuceneTestCase {
bDocIDs.add(docID);
}
}
final TermsEnum te = r.getSequentialSubReaders()[0].fields().terms("field").iterator(null);
final TermsEnum te = getOnlySegmentReader(r).fields().terms("field").iterator(null);
DocsEnum de = null;
for(int iter2=0;iter2<10;iter2++) {