db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmars...@apache.org
Subject svn commit: r790430 - /db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DboPowersTest.java
Date Thu, 02 Jul 2009 01:03:19 GMT
Author: kmarsden
Date: Thu Jul  2 01:03:18 2009
New Revision: 790430

URL: http://svn.apache.org/viewvc?rev=790430&view=rev
Log:
DERBY-4154 DboPowersTest should not hard upgrade the system/wombat database

merged revision 788369 from trunk.
Contributed by Dag H. Wanvik (dag dot wanvik at sun dot com)


Modified:
    db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DboPowersTest.java

Modified: db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DboPowersTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DboPowersTest.java?rev=790430&r1=790429&r2=790430&view=diff
==============================================================================
--- db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DboPowersTest.java
(original)
+++ db/derby/code/branches/10.4/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DboPowersTest.java
Thu Jul  2 01:03:18 2009
@@ -631,11 +631,22 @@
 
         TestSuite suite = new TestSuite("dboPowers:"+framework);
 
+        // A priori, doing a hard upgrade is a no-op here; we are only
+        // interested in checking if we have the powers to do it. However,
+        // sometimes the regression suite is run against a default database
+        // (system/wombat) created by an earlier release to check soft upgrade
+        // modes. To avoid interfering with such usage, we use a
+        // singleUseDatabaseDecorator below, so we avoid accidentally hard
+        // upgrading system/wombat in such runs. The SQLAUTHORIZATION run takes
+        // care of itself since it uses another database anyway.
+
         /* run tests with no authentication enabled */
-        suite.addTest(tests[NOAUTHENTICATION]);
+        suite.addTest(TestConfiguration.singleUseDatabaseDecorator(
+                          tests[NOAUTHENTICATION]));
 
         /* run test for all users with only authentication enabled */
-        suite.addTest(tests[AUTHENTICATION]);
+        suite.addTest(TestConfiguration.singleUseDatabaseDecorator(
+                          tests[AUTHENTICATION]));
 
         /* run test for all users with authentication and
          * sqlAuthorization enabled



Mime
View raw message