From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5267 invoked by alias); 8 Oct 2004 17:00:50 -0000 Mailing-List: contact mauve-discuss-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: mauve-discuss-owner@sources.redhat.com Received: (qmail 5253 invoked from network); 8 Oct 2004 17:00:49 -0000 Received: from unknown (HELO smtpq1.home.nl) (213.51.128.196) by sourceware.org with SMTP; 8 Oct 2004 17:00:49 -0000 Received: from [213.51.128.135] (port=32809 helo=smtp4.home.nl) by smtpq1.home.nl with esmtp (Exim 4.30) id 1CFy6q-00086Y-W3 for mauve-discuss@sources.redhat.com; Fri, 08 Oct 2004 19:00:48 +0200 Received: from cc68231-a.ensch1.ov.home.nl ([212.120.112.227]:32805 helo=dumas.thomas.planescape.com) by smtp4.home.nl with esmtp (Exim 4.30) id 1CFy6q-0000Pq-0h for mauve-discuss@sources.redhat.com; Fri, 08 Oct 2004 19:00:48 +0200 From: Thomas Zander To: Mauve Discuss Subject: Re: gnu/testlet/java/nio/channels/FileChannel/manyopen.java broken Date: Fri, 08 Oct 2004 17:00:00 -0000 User-Agent: KMail/1.7 References: <200410080647.i986l9QQ020343@piglet.dstc.edu.au> <1097229925.1087.10.camel@localhost> In-Reply-To: <1097229925.1087.10.camel@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200410081900.29934.zander@javalobby.org> X-AtHome-MailScanner-Information: Please contact support@home.nl for more information X-AtHome-MailScanner: Found to be clean X-SW-Source: 2004-q4/txt/msg00005.txt.bz2 On Friday 08 October 2004 12:05, Mark Wielaard wrote: > What I think should be tested is whether a program can open lots of > files. And that the systems notices that stale file handle resources can > be removed so that a program can keep opening files if needed. (As long > as there are no large number of life file handles open at the same > time.) So; what you want tested if a) File has finalize method b) that method actually closes the filehandle c) the GC / Finalizer / GC (in that order) is called early enough and often enough to ensure not only we don't have a OutOfMem, but also that we don't get an out-of-filehandles problem. IMO that should give you 3 seperate tests with very different things; your test (from the description, I did not read the test itself) seems to have taken the black-box-approuch which is most of the time wrong for unit tests.. > Since I have seen multiple systems get this wrong in various ways I want > to have an explicit test for this situation. It might be that this test > does not simulate a real world program correctly, so if there are > alternatives I would like to hear them instead of just deleting the test > since some systems fail it. Isn't creating an 'any' object with a finalizer and doing the same things, but keeping a counter of how often finalize is called verses how many objects are present going to test this problem much much simpler? Just a thought... -- Thomas