Return-Path: Delivered-To: apmail-db-derby-commits-archive@www.apache.org Received: (qmail 66827 invoked from network); 15 Sep 2009 12:53:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 15 Sep 2009 12:53:53 -0000 Received: (qmail 99506 invoked by uid 500); 15 Sep 2009 12:53:53 -0000 Delivered-To: apmail-db-derby-commits-archive@db.apache.org Received: (qmail 99457 invoked by uid 500); 15 Sep 2009 12:53:53 -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 99445 invoked by uid 99); 15 Sep 2009 12:53:52 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Sep 2009 12:53:52 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.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; Tue, 15 Sep 2009 12:53:49 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id E190023888D2; Tue, 15 Sep 2009 12:53:27 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r815303 - in /db/derby/code/trunk/java/testing/org/apache/derbyTesting: functionTests/tests/upgradeTests/UpgradeTrajectoryTest.java junit/JDBCClient.java junit/JDBCClientSetup.java Date: Tue, 15 Sep 2009 12:53:27 -0000 To: derby-commits@db.apache.org From: rhillegas@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090915125327.E190023888D2@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: rhillegas Date: Tue Sep 15 12:53:27 2009 New Revision: 815303 URL: http://svn.apache.org/viewvc?rev=815303&view=rev Log: DERBY-4359: Make UpgradeTrajectoryTest use the JDBC3 driver when running on Java 6 on trajectories which start before 10.2.2.0. Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/UpgradeTrajectoryTest.java db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBCClient.java db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBCClientSetup.java Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/UpgradeTrajectoryTest.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/UpgradeTrajectoryTest.java?rev=815303&r1=815302&r2=815303&view=diff ============================================================================== --- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/UpgradeTrajectoryTest.java (original) +++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/UpgradeTrajectoryTest.java Tue Sep 15 12:53:27 2009 @@ -41,6 +41,8 @@ import org.apache.derby.jdbc.EmbeddedDataSource; import org.apache.derbyTesting.junit.BaseJDBCTestCase; +import org.apache.derbyTesting.junit.JDBCClient; +import org.apache.derbyTesting.junit.JDBCClientSetup; import org.apache.derbyTesting.junit.JDBCDataSource; import org.apache.derbyTesting.junit.SecurityManagerSetup; import org.apache.derbyTesting.junit.SupportFilesSetup; @@ -147,6 +149,7 @@ public static Version VERSION_10_0_2_1 = new Version( 10, 0, 2, 1 ); public static Version VERSION_10_1_3_1 = new Version( 10, 1, 3, 1 ); + public static Version VERSION_10_2_2_0 = new Version( 10, 2, 2, 0 ); public static Version VERSION_10_5_1_1 = new Version( 10, 5, 1, 1 ); public static Version VERSION_10_6_0_0 = new Version( 10, 6, 0, 0 ); @@ -433,6 +436,17 @@ preReleaseUpgrade.setProperty( "derby.database.allowPreReleaseUpgrade", "true"); setup = new SystemPropertyTestSetup(setup, preReleaseUpgrade ); + + // If the first release in the trajectory pre-dates the release which + // introduced JDBC4, force the client to be the JDBC3 client. This + // prevents us from falling through and picking up the JDBC4 data source from + // the system classpath rather than picking up a datasource from + // the version-specific classloader. + if ( trajectory.getVersion( 0 ).compareTo( VERSION_10_2_2_0 ) < 0 ) + { + setup = new JDBCClientSetup( setup, JDBCClient.EMBEDDED_30 ); + } + suite.addTest( setup ); } Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBCClient.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBCClient.java?rev=815303&r1=815302&r2=815303&view=diff ============================================================================== --- db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBCClient.java (original) +++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBCClient.java Tue Sep 15 12:53:27 2009 @@ -31,7 +31,7 @@ /** * The embedded JDBC client. */ - static final JDBCClient EMBEDDED_30= new JDBCClient( + public static final JDBCClient EMBEDDED_30= new JDBCClient( "Embedded_30", "org.apache.derby.jdbc.EmbeddedDriver", "org.apache.derby.jdbc.EmbeddedDataSource", Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBCClientSetup.java URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBCClientSetup.java?rev=815303&r1=815302&r2=815303&view=diff ============================================================================== --- db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBCClientSetup.java (original) +++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/junit/JDBCClientSetup.java Tue Sep 15 12:53:27 2009 @@ -27,7 +27,7 @@ * is restored at tearDown time. * */ -final class JDBCClientSetup extends ChangeConfigurationSetup { +public final class JDBCClientSetup extends ChangeConfigurationSetup { private final JDBCClient client;