just committed to trunk simon
On Wed, Apr 13, 2011 at 5:06 PM, Michael McCandless <luc...@mikemccandless.com> wrote: > +1 > > Mike > > http://blog.mikemccandless.com > > On Wed, Apr 13, 2011 at 5:58 AM, Simon Willnauer > <simon.willna...@googlemail.com> wrote: >> In TestIndexWriterDelete#testUpdatesOnDiskFull especially between line >> 538 and 553 we could get a random exception from the >> MockDirectoryWrapper which makes the test fail since we are not >> catching / expecting those exceptions. >> I can make this fail on trunk even in 1000 runs but on realtime it >> fails quickly after I merged this morning. I think we should just >> disable the random exception for this part and reenable after we are >> done, see patch below! - Thoughts? >> >> >> Index: lucene/src/test/org/apache/lucene/index/TestIndexWriterDelete.java >> =================================================================== >> --- lucene/src/test/org/apache/lucene/index/TestIndexWriterDelete.java >> (revision >> 1091721) >> +++ lucene/src/test/org/apache/lucene/index/TestIndexWriterDelete.java >> (working >> copy) >> @@ -536,7 +536,9 @@ >> fail(testName + " hit IOException after disk space was freed >> up"); >> } >> } >> - >> + // prevent throwing a random exception here!! >> + final double randomIOExceptionRate = dir.getRandomIOExceptionRate(); >> + dir.setRandomIOExceptionRate(0.0); >> if (!success) { >> // Must force the close else the writer can have >> // open files which cause exc in MockRAMDir.close >> @@ -549,6 +551,7 @@ >> _TestUtil.checkIndex(dir); >> TestIndexWriter.assertNoUnreferencedFiles(dir, "after >> writer.close"); >> } >> + dir.setRandomIOExceptionRate(randomIOExceptionRate); >> >> // Finally, verify index is not corrupt, and, if >> // we succeeded, we see all docs changed, and if >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org >> For additional commands, e-mail: dev-h...@lucene.apache.org >> >> > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org