db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davi...@apache.org
Subject svn commit: r370195 - in /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests: master/RecoveryAfterBackup.out tests/store/RecoveryAfterBackup.java
Date Wed, 18 Jan 2006 17:25:39 GMT
Author: davidvc
Date: Wed Jan 18 09:25:09 2006
New Revision: 370195

URL: http://svn.apache.org/viewcvs?rev=370195&view=rev
Log:
Fix for DERBY-810, contributed by Oystein Grovlen

Removes spurious diffs for RecoveryAfterBackup test by testing for shutdown
SQL State rather than printing a stack trace.

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/RecoveryAfterBackup.out
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/RecoveryAfterBackup.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/RecoveryAfterBackup.out
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/RecoveryAfterBackup.out?rev=370195&r1=370194&r2=370195&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/RecoveryAfterBackup.out
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/master/RecoveryAfterBackup.out
Wed Jan 18 09:25:09 2006
@@ -1,7 +1,7 @@
 Count: 2 Sum: 1
 Inserting records ...
 Shutting down database ...
-SQL Exception: Derby system shutdown.
+Database shutdown completed
 Starting restore with roll-forward recovery..
 Verifying database ...
 Count: 256 Sum: 32640

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/RecoveryAfterBackup.java
URL: http://svn.apache.org/viewcvs/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/RecoveryAfterBackup.java?rev=370195&r1=370194&r2=370195&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/RecoveryAfterBackup.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/RecoveryAfterBackup.java
Wed Jan 18 09:25:09 2006
@@ -83,8 +83,13 @@
             try {
                 DataSource ds = TestUtil.getDataSource(shutdownAttrs);
                 ds.getConnection();
-            } catch (Throwable ith) {
-                ith.printStackTrace();
+            } catch(SQLException sqle) {
+                if (sqle.getSQLState() != null 
+                    && sqle.getSQLState().equals("XJ015")) {
+					System.out.println("Database shutdown completed");
+                } else {
+                    throw sqle;
+                }
             }
 
             // Start up with rollforward-recovery



Mime
View raw message