lucene-dev mailing list archives

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

I'm working on a unit test for:

     http://issues.apache.org/jira/browse/LUCENE-702

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.

Mike

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-dev-help@lucene.apache.org


Mime
View raw message