db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r788369 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DboPowersTest.java
Date Thu, 25 Jun 2009 14:44:42 GMT
Author: dag
Date: Thu Jun 25 14:44:42 2009
New Revision: 788369

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

The patch makes the hard upgrade fixture use another database than
"system/wombat", by wrapping the offending test cases in a
singleUseDatabaseDecorator.


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

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DboPowersTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DboPowersTest.java?rev=788369&r1=788368&r2=788369&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DboPowersTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DboPowersTest.java
Thu Jun 25 14:44:42 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