Return-Path: Delivered-To: apmail-jakarta-ant-user-archive@apache.org Received: (qmail 8478 invoked from network); 13 Aug 2002 19:03:14 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 13 Aug 2002 19:03:14 -0000 Received: (qmail 29703 invoked by uid 97); 13 Aug 2002 19:02:34 -0000 Delivered-To: qmlist-jakarta-archive-ant-user@jakarta.apache.org Received: (qmail 29687 invoked by uid 97); 13 Aug 2002 19:02:33 -0000 Mailing-List: contact ant-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list ant-user@jakarta.apache.org Received: (qmail 29989 invoked by uid 98); 12 Aug 2002 07:32:04 -0000 X-Antivirus: nagoya (v4198 created Apr 24 2002) Subject: Peculiar behaviour of junit task To: ant-user@jakarta.apache.org From: theis.meggerle@se.abb.com Date: Mon, 12 Aug 2002 09:31:20 +0200 Message-ID: X-MIMETrack: Serialize by Router on ABB_EMEA_SMTP02/EMEA/ABB(Release 5.0.8 |June 18, 2001) at 2002-08-12 09:35:42 MIME-Version: 1.0 Content-type: text/plain; charset=us-ascii X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi everybody! When I run my JUnit testcases via the IDE (eclipse) both as applications and as JUnit test everything works well. But when I run them (i.e. testcases) via ant my assertion code fails. Here is some java code: public GenericPoolMetaData metaData; public IXElementPool pool; /** * @see TestCase#setUp() */ protected void setUp() throws Exception { //super.setUp(); metaData = new GenericPoolMetaData(); metaData.setDebugging(false); metaData.setMaximumSize(10); metaData.setMinimumSize(5); metaData.setInitialObjects(5); metaData.setName("pool"); pool = new IXElementPool(metaData); } public void testRequestingElements() { this.assertNotNull(pool); this.assertEquals("pool", pool.getPoolname()); System.out.println(pool.numCheckedInObjects()); // Just a confirmation. this.assertEquals(5, pool.numCheckedInObjects()); this.assertEquals(0, pool.numCheckedOutObjects()); IXElement element = (IXElement) pool.requestObject(); this.assertNotNull(element); this.assertEquals(4, pool.numCheckedInObjects()); this.assertEquals(1, pool.numCheckedOutObjects()); } Here is the ant code: When I run it via ant the test for number of checked in objects (pool.numCheckedInObjects()) will fail asserting that the expected result is 5 but the actual is 0. Any idea? Thanks in advance, /Theis. -- To unsubscribe, e-mail: For additional commands, e-mail: