LUCENE-2858: fix tests

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene2858@1237303 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Muir 2012-01-29 14:49:58 +00:00
parent 126514b83f
commit 03819e5190
2 changed files with 3 additions and 3 deletions

View File

@ -93,7 +93,6 @@ public class TestExternalCodecs extends LuceneTestCase {
w.deleteDocuments(new Term("id", "77"));
IndexReader r = IndexReader.open(w, true);
IndexReader[] subs = r.getSequentialSubReaders();
assertEquals(NUM_DOCS-1, r.numDocs());
IndexSearcher s = newSearcher(r);

View File

@ -34,6 +34,7 @@ import org.apache.lucene.codecs.preflexrw.PreFlexRWCodec;
import org.apache.lucene.document.Document;
import org.apache.lucene.document.StringField;
import org.apache.lucene.index.CorruptIndexException;
import org.apache.lucene.index.DirectoryReader;
import org.apache.lucene.index.FieldInfos;
import org.apache.lucene.index.FieldsEnum;
import org.apache.lucene.index.IndexFileNames;
@ -93,8 +94,8 @@ public class TestTermInfosReaderIndex extends LuceneTestCase {
populate(directory, config);
IndexReader r0 = IndexReader.open(directory);
SegmentReader r = (SegmentReader) r0.getSequentialSubReaders()[0];
DirectoryReader r0 = IndexReader.open(directory);
SegmentReader r = LuceneTestCase.getOnlySegmentReader(r0);
String segment = r.getSegmentName();
r.close();