Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 97265 invoked from network); 16 Jan 2006 10:20:39 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 16 Jan 2006 10:20:39 -0000 Received: (qmail 81731 invoked by uid 500); 16 Jan 2006 10:20:34 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 81687 invoked by uid 500); 16 Jan 2006 10:20:33 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 81672 invoked by uid 99); 16 Jan 2006 10:20:33 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Jan 2006 02:20:33 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [192.6.10.60] (HELO tobor.hpl.hp.com) (192.6.10.60) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 16 Jan 2006 02:20:32 -0800 Received: from localhost (localhost [127.0.0.1]) by tobor.hpl.hp.com (Postfix) with ESMTP id E10EE370EF for ; Mon, 16 Jan 2006 10:20:10 +0000 (GMT) Received: from tobor.hpl.hp.com ([127.0.0.1]) by localhost (tobor.hpl.hp.com [127.0.0.1]) (amavisd-new, port 20024) with LMTP id 08111-01-6 for ; Mon, 16 Jan 2006 10:20:10 +0000 (GMT) Received: from kropotkin.hpl.hp.com (kropotkin.hpl.hp.com [15.144.59.2]) by tobor.hpl.hp.com (Postfix) with ESMTP id D94463707D for ; Mon, 16 Jan 2006 10:20:09 +0000 (GMT) Received: from localhost (localhost [127.0.0.1]) by kropotkin.hpl.hp.com (Postfix) with ESMTP id 1096EA80E for ; Mon, 16 Jan 2006 10:20:08 +0000 (GMT) Received: from kropotkin.hpl.hp.com ([127.0.0.1]) by localhost (kropotki [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 25050-01 for ; Mon, 16 Jan 2006 10:20:05 +0000 (GMT) Received: from timmay.hpl.hp.com (timmay-hb.hpl.hp.com [15.144.59.39]) by kropotkin.hpl.hp.com (Postfix) with ESMTP id C43DD8BA4 for ; Mon, 16 Jan 2006 10:20:04 +0000 (GMT) Received: from [15.144.25.135] (chamonix.hpl.hp.com [15.144.25.135]) by timmay.hpl.hp.com (8.13.2/8.13.2) with ESMTP id k0GAJgsf005356 for ; Mon, 16 Jan 2006 10:19:42 GMT Message-ID: <43CB733E.6010201@apache.org> Date: Mon, 16 Jan 2006 10:19:42 +0000 From: Steve Loughran User-Agent: Mozilla Thunderbird 1.0.6 (X11/20050715) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Ant Users List Subject: Re: problem running ant/junit from Eclipse References: <20060116081353.53040.qmail@web35415.mail.mud.yahoo.com> In-Reply-To: <20060116081353.53040.qmail@web35415.mail.mud.yahoo.com> Content-Type: text/plain; charset=iso-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-HPLB-IMAP-MailScanner-Information: Please contact the Helpdesk for more information X-HPLB-IMAP-MailScanner: Found to be clean X-HPLB-IMAP-MailScanner-SpamCheck: not spam, SpamAssassin (score=0, required 5) X-Virus-Scanned: amavisd-new at kropotkin.hpl.hp.com X-Virus-Scanned: amavisd-new at hplb.hpl.hp.com X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N maarten roosendaal wrote: > Hi, > > I have create a MultiThreadedTestCase based on the one > descibed in > http://www.javaworld.com/javaworld/jw-12-2000/jw-1221-junit.html. > It uses an Innerclass that extends TestCaseRunnable > that implements Runnable. > > When i run the test from Eclipse it works fine. When i > run the test from an ANT build-file it fails with the > following message: > Class > nl.test.threadsafety.TestDatabaseLocking$CounterThread > has no public constructor TestCase(String name) or > TestCase() > > junit.framework.AssertionFailedError: Class > nl.ictu.spg.test.threadsafety.TestDatabaseLocking$CounterThread > has no public constructor TestCase(String name) or > TestCase() > > What could cause this problem when simply running the > unittest WITHOUT ANT is working fine? I know a > TestClass should extend the TestCase-class but when > implementing Runnable you have a problem with the > run(). But this does not seem to be the problem > otherwise the problem would occur in both instances. > 1. We don't know how eclipse runs its tests. It probably introspects to only run everything that extends TestCase 2. I'd look at your pattern of selecting which tests to run. Junit appears to have been handed the thread to turn into a test case, which obviously fails as it isnt one. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org