lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Muir (Created) (JIRA)" <>
Subject [jira] [Created] (LUCENE-3899) Evil up MockDirectoryWrapper.checkIndexOnClose
Date Wed, 21 Mar 2012 13:59:40 GMT
Evil up MockDirectoryWrapper.checkIndexOnClose

                 Key: LUCENE-3899
             Project: Lucene - Java
          Issue Type: Test
            Reporter: Robert Muir
             Fix For: 3.6, 4.0
         Attachments: LUCENE-3899.patch

MockDirectoryWrapper checks any indexes tests create on close(), if they exist.

The problem is the logic it uses to determine if an index exists could mask real bugs (e.g.
segments file corrumption):
if (DirectoryReader.indexExists(this) {
  // evil stuff like crash()

and for reference DirectoryReader.indexExists is:
try {
  new SegmentInfos().read(directory);
  return true;
} catch (IOException ioe) {
  return false;

So if there are segments file problems, we just silently do no checkIndex.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:!default.jspa
For more information on JIRA, see:


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message