LUCENE-1625: properly set openReaderPassed in CheckIndex

git-svn-id: https://svn.apache.org/repos/asf/lucene/java/trunk@773190 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2009-05-09 10:21:41 +00:00
parent 3dbed702f0
commit 4a41b8c229
2 changed files with 5 additions and 0 deletions

View File

@ -393,6 +393,9 @@ public class CheckIndex {
if (infoStream != null)
infoStream.print(" test: open reader.........");
reader = SegmentReader.get(info);
segInfoStat.openReaderPassed = true;
final int numDocs = reader.numDocs();
toLoseDocCount = numDocs;
if (reader.hasDeletions()) {

View File

@ -55,6 +55,8 @@ public class TestCheckIndex extends LuceneTestCase {
System.out.println(bos.toString());
fail();
}
assertTrue(((CheckIndex.Status.SegmentInfoStatus) indexStatus.segmentInfos.get(0)).openReaderPassed);
final List onlySegments = new ArrayList();
onlySegments.add("_0");