lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <>
Subject Making RAMDirectory non final?
Date Wed, 22 Nov 2006 21:05:49 GMT

I'm working on a unit test for:

which is the "disk full during addIndexes() can corrupt index" issue.

I think the simplest way to do this is to subclass RAMDirectory to
create a MockDiskFullRAMDirectory class (and a corresponding
MockDiskFullRAMOutputStream) that lets you set the max size and
then throws IOException to simulate disk full.

The recent commit for LUCENE-709 is wonderful because it incrementally
tracks total size so it's real simple to check :)

But to do this I'd need to make RAMDirectory non-final.  Any
objections to this?

If we do this we can also put other "test only" methods (eg the
"getRecomputedSizeInBytes()") into the same (or different) subclass,
over time.


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

View raw message