Return-Path: Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: (qmail 99711 invoked from network); 6 Nov 2007 21:19:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 6 Nov 2007 21:19:12 -0000 Received: (qmail 22876 invoked by uid 500); 6 Nov 2007 21:18:59 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 22849 invoked by uid 500); 6 Nov 2007 21:18:59 -0000 Mailing-List: contact derby-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: Delivered-To: mailing list derby-dev@db.apache.org Received: (qmail 22840 invoked by uid 99); 6 Nov 2007 21:18:59 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Nov 2007 13:18:59 -0800 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.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Nov 2007 21:19:11 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 0FDC8714211 for ; Tue, 6 Nov 2007 13:18:51 -0800 (PST) Message-ID: <29284971.1194383931061.JavaMail.jira@brutus> Date: Tue, 6 Nov 2007 13:18:51 -0800 (PST) From: "Mamta A. Satoor (JIRA)" To: derby-dev@db.apache.org Subject: [jira] Updated: (DERBY-3178) DataSourceTest uses ConnectionEventListener but never verifies that events are getting fired In-Reply-To: <26127517.1194368930884.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-3178?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Mamta A. Satoor updated DERBY-3178: ----------------------------------- Attachment: DERBY_3178_diff_ver1_Nov_06_2007.txt Committed attached patch DERBY_3178_diff_ver1_Nov_06_2007.txt to trunk using revision 592544. The commit comments which describes the fix are as follows DERBY-3178 This commit modifies DataSourceTest.java to ensure that expected Connection events are fired to the ConnectionEventListener. The changes have been implemented by having AssertEventCatcher in DataSourceTest.java keep track of what events it received. This state is kept in boolean gotConnectionClosed and boolean gotConnectionErrorOccured flags in AssertEventCatcher. The test then checks the state of AssertEventCatcher after the test has done firing the events to make sure AssertEventCatcher got the expected events. > DataSourceTest uses ConnectionEventListener but never verifies that events are getting fired > -------------------------------------------------------------------------------------------- > > Key: DERBY-3178 > URL: https://issues.apache.org/jira/browse/DERBY-3178 > Project: Derby > Issue Type: Test > Components: Test > Affects Versions: 10.4.0.0 > Reporter: Mamta A. Satoor > Assignee: Mamta A. Satoor > Attachments: DERBY_3178_diff_ver1_Nov_06_2007.txt > > > Derby has a junit test called DataSourceTest in jdbcapi package. This test registers ConnectionEventListener for various Connection objects but never verifies that events from those Connection objects are getting delivered to the listeners. Prior to this test's conversion to junit, there were System.out.println in the test but since this test is not cannon based anymore, those printlns have been commented out. I will soon submit a patch where this test will have asserts to make sure that Connection events are getting fired. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.