Return-Path: Delivered-To: apmail-lucene-java-dev-archive@www.apache.org Received: (qmail 50509 invoked from network); 22 Nov 2006 21:06:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Nov 2006 21:06:24 -0000 Received: (qmail 61285 invoked by uid 500); 22 Nov 2006 21:06:33 -0000 Delivered-To: apmail-lucene-java-dev-archive@lucene.apache.org Received: (qmail 60648 invoked by uid 500); 22 Nov 2006 21:06:31 -0000 Mailing-List: contact java-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@lucene.apache.org Delivered-To: mailing list java-dev@lucene.apache.org Received: (qmail 60636 invoked by uid 99); 22 Nov 2006 21:06:31 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Nov 2006 13:06:31 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: local policy) Received: from [66.111.4.26] (HELO out2.smtp.messagingengine.com) (66.111.4.26) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 22 Nov 2006 13:06:18 -0800 Received: from db2.internal (db2.internal [10.202.2.12]) by out1.messagingengine.com (Postfix) with ESMTP id 3128C4015 for ; Wed, 22 Nov 2006 16:05:58 -0500 (EST) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by db2.internal (MEProxy); Wed, 22 Nov 2006 16:05:58 -0500 X-Sasl-enc: 743iZXLWw3K5sx0fOtGpoQp8Kz56NeheHiziyAuaQmKB 1164229555 Received: from [10.17.4.90] (pool-72-70-33-214.bstnma.fios.verizon.net [72.70.33.214]) by mail.messagingengine.com (Postfix) with ESMTP id 7664414682 for ; Wed, 22 Nov 2006 16:05:55 -0500 (EST) Message-ID: <4564BBAD.6050601@mikemccandless.com> Date: Wed, 22 Nov 2006 16:05:49 -0500 From: Michael McCandless User-Agent: Thunderbird 1.5.0.8 (Windows/20061025) MIME-Version: 1.0 To: java-dev@lucene.apache.org Subject: Making RAMDirectory non final? Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 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