Return-Path: Delivered-To: apmail-db-ddlutils-dev-archive@www.apache.org Received: (qmail 67530 invoked from network); 28 Dec 2005 22:00:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 28 Dec 2005 22:00:06 -0000 Received: (qmail 37445 invoked by uid 500); 28 Dec 2005 22:00:05 -0000 Delivered-To: apmail-db-ddlutils-dev-archive@db.apache.org Received: (qmail 37426 invoked by uid 500); 28 Dec 2005 22:00:05 -0000 Mailing-List: contact ddlutils-dev-help@db.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ddlutils-dev@db.apache.org Delivered-To: mailing list ddlutils-dev@db.apache.org Received: (qmail 37415 invoked by uid 500); 28 Dec 2005 22:00:05 -0000 Delivered-To: apmail-db-ddlutils-commits@db.apache.org Received: (qmail 37412 invoked by uid 99); 28 Dec 2005 22:00:05 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Dec 2005 14:00:05 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Wed, 28 Dec 2005 14:00:04 -0800 Received: (qmail 67416 invoked by uid 65534); 28 Dec 2005 21:59:44 -0000 Message-ID: <20051228215944.67414.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r359649 - /db/ddlutils/trunk/src/test/org/apache/ddlutils/TestDatabaseWriterBase.java Date: Wed, 28 Dec 2005 21:59:44 -0000 To: ddlutils-commits@db.apache.org From: tomdz@apache.org X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: tomdz Date: Wed Dec 28 13:59:40 2005 New Revision: 359649 URL: http://svn.apache.org/viewcvs?rev=359649&view=rev Log: Changed test base class so that the database type is only queried from the connection if not specified directly via the properties Added call to shutdown the platform after a test Modified: db/ddlutils/trunk/src/test/org/apache/ddlutils/TestDatabaseWriterBase.java Modified: db/ddlutils/trunk/src/test/org/apache/ddlutils/TestDatabaseWriterBase.java URL: http://svn.apache.org/viewcvs/db/ddlutils/trunk/src/test/org/apache/ddlutils/TestDatabaseWriterBase.java?rev=359649&r1=359648&r2=359649&view=diff ============================================================================== --- db/ddlutils/trunk/src/test/org/apache/ddlutils/TestDatabaseWriterBase.java (original) +++ db/ddlutils/trunk/src/test/org/apache/ddlutils/TestDatabaseWriterBase.java Wed Dec 28 13:59:40 2005 @@ -96,11 +96,11 @@ throw new DynaSqlException(ex); } - _databaseName = new PlatformUtils().determineDatabaseType(_dataSource); + _databaseName = props.getProperty(PLATFORM_PROPERTY); if (_databaseName == null) { - // could not determine, perhaps the property has been set ? - _databaseName = props.getProperty(PLATFORM_PROPERTY); + // property not set, then try to determine + _databaseName = new PlatformUtils().determineDatabaseType(_dataSource); if (_databaseName == null) { throw new DynaSqlException("Could not determine platform from datasource, please specify it in the jdbc.properties via the ddlutils.platform property"); @@ -150,10 +150,17 @@ */ protected void tearDown() throws Exception { - if (_model != null) + try { - dropDatabase(); - _model = null; + if (_model != null) + { + dropDatabase(); + _model = null; + } + } + finally + { + getPlatform().shutdownDatabase(); } super.tearDown(); }