Return-Path: X-Original-To: apmail-db-derby-commits-archive@www.apache.org Delivered-To: apmail-db-derby-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id F0AC0916F for ; Wed, 25 Jan 2012 10:25:43 +0000 (UTC) Received: (qmail 27718 invoked by uid 500); 25 Jan 2012 10:25:43 -0000 Delivered-To: apmail-db-derby-commits-archive@db.apache.org Received: (qmail 27668 invoked by uid 500); 25 Jan 2012 10:25:43 -0000 Mailing-List: contact derby-commits-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: "Derby Development" List-Id: Delivered-To: mailing list derby-commits@db.apache.org Received: (qmail 27657 invoked by uid 99); 25 Jan 2012 10:25:42 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Jan 2012 10:25:42 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Jan 2012 10:25:41 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 7361B238890B; Wed, 25 Jan 2012 10:25:21 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1235709 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/NativeAuthenticationServiceTest.java Date: Wed, 25 Jan 2012 10:25:21 -0000 To: derby-commits@db.apache.org From: kahatlen@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20120125102521.7361B238890B@eris.apache.org> Author: kahatlen Date: Wed Jan 25 10:25:21 2012 New Revision: 1235709 URL: http://svn.apache.org/viewvc?rev=1235709&view=rev Log: DERBY-5580: NativeAuthenticationServiceTest fails to delete databases Make sure the databases get shut down before attempting to delete them. Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/NativeAuthenticationServiceTest.java Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/NativeAuthenticationServiceTest.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/NativeAuthenticationServiceTest.java?rev=1235709&r1=1235708&r2=1235709&view=diff ============================================================================== --- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/NativeAuthenticationServiceTest.java (original) +++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/NativeAuthenticationServiceTest.java Wed Jan 25 10:25:21 2012 @@ -25,10 +25,9 @@ import java.sql.Connection; import java.sql.SQLException; import java.util.Properties; +import junit.extensions.TestSetup; import junit.framework.Test; import junit.framework.TestSuite; -import org.apache.derbyTesting.junit.BaseJDBCTestCase; -import org.apache.derbyTesting.junit.DatabaseChangeSetup; import org.apache.derbyTesting.junit.JDBC; import org.apache.derbyTesting.junit.TestConfiguration; import org.apache.derbyTesting.junit.SystemPropertyTestSetup; @@ -199,6 +198,16 @@ public class NativeAuthenticationService { result = new SystemPropertyTestSetup( result, systemProperties, true ); } + else + { + // DERBY-5580: We should also shut down the engine before deleting + // the database if we don't set any system properties. + result = new TestSetup(result) { + protected void tearDown() { + TestConfiguration.getCurrent().shutdownEngine(); + } + }; + } // // Register temporary databases, where the test will do its work.