Return-Path: X-Original-To: apmail-db-derby-dev-archive@www.apache.org Delivered-To: apmail-db-derby-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 27E59CA36 for ; Thu, 3 May 2012 08:51:20 +0000 (UTC) Received: (qmail 95477 invoked by uid 500); 3 May 2012 08:51:20 -0000 Delivered-To: apmail-db-derby-dev-archive@db.apache.org Received: (qmail 95440 invoked by uid 500); 3 May 2012 08:51:19 -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 95432 invoked by uid 99); 3 May 2012 08:51:19 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 May 2012 08:51:19 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 03 May 2012 08:51:18 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 4E01742D2E4 for ; Thu, 3 May 2012 08:50:58 +0000 (UTC) Date: Thu, 3 May 2012 08:50:58 +0000 (UTC) From: "Kristian Waagan (JIRA)" To: derby-dev@db.apache.org Message-ID: <1079587787.20999.1336035058386.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <257043258.8575.1335778487740.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Closed] (DERBY-5734) End transaction if CleanDatabaseTestSetup.decorateSQL fails MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/DERBY-5734?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Kristian Waagan closed DERBY-5734. ---------------------------------- Resolution: Fixed Fix Version/s: 10.9.0.0 Issue & fix info: (was: Patch Available) Committed to trunk with revision 1333360. Closing issue. > End transaction if CleanDatabaseTestSetup.decorateSQL fails > ----------------------------------------------------------- > > Key: DERBY-5734 > URL: https://issues.apache.org/jira/browse/DERBY-5734 > Project: Derby > Issue Type: Improvement > Components: Test > Affects Versions: 10.9.0.0 > Reporter: Kristian Waagan > Assignee: Kristian Waagan > Priority: Minor > Fix For: 10.9.0.0 > > Attachments: derby-5734-1a-end_transaction.diff, derby-5734-1b-end_transaction.diff > > > By overriding CleanDatabaseTestSetup.decorateSQL you are allowed to perform tasks as part of the test setup / decorator. The connection obtainable through the passed in statement is configured with auto-commit off. If decorateSQL fails the connection may be left active in the middle of a transaction, which again may cause subsequent tests to fails. I've observed subsequent tests fail due to locks helds by the statement / connection passed to decorateSQL. > CleanDatabaseTestSetup.setUp should ensure the transaction is ended regardless of whether decorateSQL throws an exception or not. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa For more information on JIRA, see: http://www.atlassian.com/software/jira