Return-Path: Delivered-To: apmail-incubator-harmony-dev-archive@www.apache.org Received: (qmail 93650 invoked from network); 23 Aug 2006 10:25:24 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 23 Aug 2006 10:25:24 -0000 Received: (qmail 12559 invoked by uid 500); 23 Aug 2006 10:25:22 -0000 Delivered-To: apmail-incubator-harmony-dev-archive@incubator.apache.org Received: (qmail 12356 invoked by uid 500); 23 Aug 2006 10:25:21 -0000 Mailing-List: contact harmony-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-dev@incubator.apache.org Received: (qmail 12345 invoked by uid 99); 23 Aug 2006 10:25:21 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 23 Aug 2006 03:25:21 -0700 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: 64.74.244.71 is neither permitted nor denied by domain of geir@pobox.com) Received: from [64.74.244.71] (HELO chi.mobile-health-diary.com) (64.74.244.71) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 23 Aug 2006 03:25:20 -0700 Received: (qmail 12394 invoked from network); 23 Aug 2006 10:24:57 -0000 Received: from ool-43560edb.dyn.optonline.net (HELO ?192.168.1.102?) (geir@67.86.14.219) by b014.internal.mobile-health-diary.com with SMTP; 23 Aug 2006 10:24:57 -0000 Message-ID: <44EC2CFC.7050001@pobox.com> Date: Wed, 23 Aug 2006 06:25:00 -0400 From: "Geir Magnusson Jr." Reply-To: geir@pobox.com User-Agent: Thunderbird 1.5.0.5 (Macintosh/20060719) MIME-Version: 1.0 To: harmony-dev@incubator.apache.org Subject: Re: [classlib][test]Is this test necessary? References: <44EBCDC3.9090003@gmail.com> <44EC0512.7000306@gmail.com> In-Reply-To: <44EC0512.7000306@gmail.com> Content-Type: text/plain; charset=gb18030; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N But lets not lose the OOM test - that would be good for DRLVM to have... geir Paulex Yang wrote: > So I will rewrite it to *really* test the constructor if no one objects. > > Paulex Yang wrote: >> The test case >> below(org.apache.harmony.luni.tests.java.lang.OutOfMemoryErrorTest) >> generally needs > 250 seconds on my thinkpad: >> public void test_Constructor() { >> // Test for method java.lang.OutOfMemoryError() >> try { >> StringBuffer large[] = new StringBuffer[100000]; >> >> for (int i = 0; i < large.length; i++) >> large[i] = new StringBuffer(1000000); >> } catch (OutOfMemoryError e) { >> return; >> } >> fail("No error generated"); >> } >> >> IMO it is not a unit test of OutOfMemoryError constructor like its >> name, actually what it tries to test is the JVM memory management >> >> I suggest to remove this testcase, at least it can be written like >> below to get same error thrown much quickly: >> >> StringBuffer large = new StringBuffer(Integer.MAX_VALUE); >> > > --------------------------------------------------------------------- Terms of use : http://incubator.apache.org/harmony/mailing.html To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org For additional commands, e-mail: harmony-dev-help@incubator.apache.org