db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r519950 - in /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests: BasicSetup.java UpgradeRun.java
Date Mon, 19 Mar 2007 14:07:13 GMT
Author: djd
Date: Mon Mar 19 07:07:12 2007
New Revision: 519950

URL: http://svn.apache.org/viewvc?view=rev&rev=519950
Log:
DERBY-2217 Add test fixture to JUnit test case that tests a connection cannot be made to the
upgraded database from the old version.

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/BasicSetup.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/UpgradeRun.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/BasicSetup.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/BasicSetup.java?view=diff&rev=519950&r1=519949&r2=519950
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/BasicSetup.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/BasicSetup.java
Mon Mar 19 07:07:12 2007
@@ -126,4 +126,24 @@
         ps.close();
         commit();
     }
+    
+    /**
+     * Ensure that after hard upgrade (with the old version)
+     * we can no longer connect to the database.
+     */
+    public void noConnectionAfterHardUpgrade()
+    {              
+        switch (getPhase())
+        {
+        case PH_POST_HARD_UPGRADE:
+            try {
+                    getConnection();
+                } catch (SQLException e) {
+                    // Other SQL states might be valid,
+                    // once the beta flag is dropped.
+                    assertSQLState("XSLAP", e);
+                }
+            break;
+        }
+    }
 }

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/UpgradeRun.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/UpgradeRun.java?view=diff&rev=519950&r1=519949&r2=519950
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/UpgradeRun.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/upgradeTests/UpgradeRun.java
Mon Mar 19 07:07:12 2007
@@ -220,6 +220,10 @@
                 break;
             }
         }
+        else
+        {
+            suite.addTest(new BasicSetup("noConnectionAfterHardUpgrade"));
+        }
                 
         return TestConfiguration.connectionDSDecorator(suite);
     }



Mime
View raw message