db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From myrn...@apache.org
Subject svn commit: r1004378 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/OSReadOnlyTest.java
Date Mon, 04 Oct 2010 19:47:23 GMT
Author: myrnavl
Date: Mon Oct  4 19:47:22 2010
New Revision: 1004378

URL: http://svn.apache.org/viewvc?rev=1004378&view=rev
Log:
DERBY-4804; Make database used in store.OSReadOnlyTest fully read-only 
  accepting SQLState 40XD1 as alternative which is what we get on iseries.

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

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/OSReadOnlyTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/OSReadOnlyTest.java?rev=1004378&r1=1004377&r2=1004378&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/OSReadOnlyTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/store/OSReadOnlyTest.java
Mon Oct  4 19:47:22 2010
@@ -268,7 +268,11 @@ public class OSReadOnlyTest extends Base
                     insertIntValue + ", '" + insertStringValue + "')");
                 fail("expected an error indicating the db is readonly");
             } catch (SQLException sqle) {
-                assertSQLState("25502", sqle);
+                if (!(sqle.getSQLState().equals("25502") || 
+                        // on iseries / OS400 machines, when file/os 
+                        // permissions are off, we may get error 40XD1 instead
+                        sqle.getSQLState().equals("40XD1")))
+                    fail("unexpected sqlstate; expected 25502 or 40XD1, got: " + sqle.getSQLState());
             }
         }
         stmt.close();



Mime
View raw message