db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From d..@apache.org
Subject svn commit: r543213 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/AuthenticationTest.java
Date Thu, 31 May 2007 18:49:46 GMT
Author: djd
Date: Thu May 31 11:49:45 2007
New Revision: 543213

URL: http://svn.apache.org/viewvc?view=rev&rev=543213
Log:
Add an assert for Connection isReadOnly() and read-only connections set through connection
level authorization. Added comment for DERBY-2738 indicating that network client always
returns false.

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

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/AuthenticationTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/AuthenticationTest.java?view=diff&rev=543213&r1=543212&r2=543213
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/AuthenticationTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/AuthenticationTest.java
Thu May 31 11:49:45 2007
@@ -456,6 +456,10 @@
         assertUserValue(new String[] {"SYSTEM"},"ames", 
             "select * from APP.t1"); // should succeed
         conn1 = openDefaultConnection("ames", ("ames"+PASSWORD_SUFFIX));
+        
+        // DERBY-2738 (network client always returns false for isReadOnly)
+        if (usingEmbedded())
+            assertTrue(conn1.isReadOnly());
         stmt = conn1.createStatement();
         assertStatementError(
             "25502", stmt, "delete from APP.t1 where c1 = 'SYSTEM'");
@@ -465,8 +469,13 @@
         assertStatementError("25503", stmt, "create table APP.t2 (c1 int)");
         conn1.commit();
         stmt.close();
+        conn1.close();
+        
         // read-only system level user
         conn1 = openDefaultConnection("mickey", "mouse");
+        // DERBY-2738 (network client always returns false for isReadOnly)
+        if (usingEmbedded())
+            assertTrue(conn1.isReadOnly());
         stmt = conn1.createStatement();
         assertStatementError(
             "25502", stmt, "delete from APP.t1 where c1 = 'SYSTEM'");



Mime
View raw message