You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-commits@db.apache.org by da...@apache.org on 2009/06/25 17:04:37 UTC

svn commit: r788377 - in /db/derby/code/branches/10.5: ./ java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DboPowersTest.java

Author: dag
Date: Thu Jun 25 15:04:37 2009
New Revision: 788377

URL: http://svn.apache.org/viewvc?rev=788377&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.

Merged from trunk as:
svn merge -c 788369 https://svn.eu.apache.org/repos/asf/db/derby/code/trunk

Modified:
    db/derby/code/branches/10.5/   (props changed)
    db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DboPowersTest.java

Propchange: db/derby/code/branches/10.5/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jun 25 15:04:37 2009
@@ -1 +1 @@
-/db/derby/code/trunk:772090,772449,772534,774281,779681,782991,785163,785570,785662
+/db/derby/code/trunk:772090,772449,772534,774281,779681,782991,785163,785570,785662,788369

Modified: db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DboPowersTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DboPowersTest.java?rev=788377&r1=788376&r2=788377&view=diff
==============================================================================
--- db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DboPowersTest.java (original)
+++ db/derby/code/branches/10.5/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/DboPowersTest.java Thu Jun 25 15:04:37 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