Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 36240 invoked from network); 26 Oct 2007 14:00:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 26 Oct 2007 14:00:06 -0000 Received: (qmail 21976 invoked by uid 500); 26 Oct 2007 13:59:54 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 21888 invoked by uid 500); 26 Oct 2007 13:59:54 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 21879 invoked by uid 99); 26 Oct 2007 13:59:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Oct 2007 06:59:54 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.3] (HELO eris.apache.org) (140.211.11.3) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 26 Oct 2007 14:00:06 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id D987A1A983A; Fri, 26 Oct 2007 06:59:43 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r588649 - in /harmony/enhanced/drlvm/trunk/src/test/regression/H3822: ./ Test.java Date: Fri, 26 Oct 2007 13:59:43 -0000 To: commits@harmony.apache.org From: wjwashburn@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20071026135943.D987A1A983A@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: wjwashburn Date: Fri Oct 26 06:59:42 2007 New Revision: 588649 URL: http://svn.apache.org/viewvc?rev=588649&view=rev Log: H3822 -- a regression test that test > 338 threads can be created on Linux. Added: harmony/enhanced/drlvm/trunk/src/test/regression/H3822/ harmony/enhanced/drlvm/trunk/src/test/regression/H3822/Test.java (with props) Added: harmony/enhanced/drlvm/trunk/src/test/regression/H3822/Test.java URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/src/test/regression/H3822/Test.java?rev=588649&view=auto ============================================================================== --- harmony/enhanced/drlvm/trunk/src/test/regression/H3822/Test.java (added) +++ harmony/enhanced/drlvm/trunk/src/test/regression/H3822/Test.java Fri Oct 26 06:59:42 2007 @@ -0,0 +1,62 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package org.apache.harmony.drlvm.tests.regression.h3822; +import junit.framework.*; + +public class Test extends TestCase { + public static void main(String[] args) { + (new Test()).test(); + } + + public void test() { + try { + if (!(new ThreadTest()).test()) { + fail(); + } + } catch (Throwable e) { + e.printStackTrace(); + fail(); + } + } +} + +class ThreadTest extends Thread { + public boolean test() { + final int MAX_THREADS = 10000; + int i = 0; + try { + for (i = 0; i < MAX_THREADS; i++) { + ThreadTest t = new ThreadTest(); + t.start(); + try { + t.join(); + } catch (InterruptedException e) { + e.printStackTrace(); + break; + } + } + } finally { + System.out.println("Created threads: " + i); + } + return (i == MAX_THREADS); + } + + public void run() { + System.out.print("*"); + } +} Propchange: harmony/enhanced/drlvm/trunk/src/test/regression/H3822/Test.java ------------------------------------------------------------------------------ svn:eol-style = native